Discussion in 'Plugin Development' started by MattexFilms, Sep 20, 2012.
How would you convert ticks into seconds or minutes?
I'm pretty sure that 20 ticks = 1 second.
Okay thanks, I'll see what I can do with that.
MattexFilms You can't always assume that 20 ticks == 1 second, because the server can slow down and end up processing fewer ticks per second due to heavy load. For most implementations it doesn't really matter, but if a server is running your plugin and is operating at only 10 ticks per second, every tick-based countdown and the like will take twice as long to elapse.
Ohh right, cause I am doing something where players can see how long they have been alive. I'm using .getTicksLived() and I wanted to convert the ticks into a unit of time.
It should adapt to the servers ticks per second automatically, as its counting the players ticks serverside, not assuming anything. At least, thats what i would think
Separate names with a comma.