All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.exaroton.api.ws.data.TickData Maven / Gradle / Ivy

There is a newer version: 1.5.0
Show newest version
package com.exaroton.api.ws.data;

public class TickData {
    private double averageTickTime;

    /**
     * get average tick time
     * @return average tick time in ms
     */
    public double getAverageTickTime() {
        return averageTickTime;
    }

    /**
     * calculate tps (ticks per second)
     * 1000 / tick time (limit = 20)
     * @return calculated tps
     */
    public double calculateTPS() {
        if (this.averageTickTime < 50) return 20;
        return 1000 / this.averageTickTime;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy