<commit_before>package ee.ellytr.autoclick.tps;

public class TPSTracker {

    private static double lastTick = System.nanoTime();
    private static double tps = 0;

    public static void tick() {
        try {
            tps = 1 / ((System.nanoTime() - lastTick) / 1000000000.0);
        } catch (ArithmeticException e) {
        }
        lastTick = System.nanoTime();
    }

    public static double getTPS() {
        return tps;
    }

}<commit_msg>Fix a needless ArithmeticException with TPS tracking<commit_after>package ee.ellytr.autoclick.tps;

public class TPSTracker {

    private static double lastTick = -1;
    private static double tps = 0;

    public static void tick() {
        if (lastTick != -1) {
            tps = 1 / ((System.nanoTime() - lastTick) / 1000000000.0);
        }
        lastTick = System.nanoTime();
    }

    public static double getTPS() {
        return tps;
    }

}
{'fraction_non_alphanumeric': 0.1061269146608315, 'fraction_numerical': 0.030634573304157548, 'mean_word_length': 2.221830985915493, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4622669', 'n_tokens_mistral': 318, 'n_tokens_neox': 284, 'n_words': 77}