Changing SystemTimeMillis() to Seconds.

Discussion in 'Plugin Development' started by iPhysX, Dec 17, 2011.

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

    iPhysX

    Ok, so a little information.
    I have a hashmap...
    Code:java
    1. public static HashMap<Player, Long> respawns = new HashMap<Player, Long>();

    When a player respawns I add them to the hashmap with the systemTimeMillis();

    And whilst someone is in the hashmap i check every 3 seconds to see if they have been in the hashmap for 10 seconds or more.

    How can i tell how many seconds have passed from this?
    Thanks!
     
  2. Offline

    Coryf88

    1 second = 1000 milliseconds. So, 10 seconds is 10000 milliseconds.
     
  3. Offline

    iPhysX

    @Coryf88
    Thanks alot, exactly what I was looking for :)
     
    Adamki11s likes this.
Thread Status:
Not open for further replies.

Share This Page