Convert Ticks into Minutes/Seconds?

Discussion in 'Plugin Development' started by MattexFilms, Sep 20, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    MattexFilms

    How would you convert ticks into seconds or minutes?
     
  2. Offline

    gregthegeek

    I'm pretty sure that 20 ticks = 1 second.
     
  3. Offline

    MattexFilms

    Okay thanks, I'll see what I can do with that.
     
  4. Offline

    makskay

    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.
     
  5. Offline

    MattexFilms

    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.
     
  6. Offline

    -_Husky_-

    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
     
Thread Status:
Not open for further replies.

Share This Page