Getting Timestamp

Discussion in 'Plugin Development' started by ohtwo, Mar 29, 2013.

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

    ohtwo

    I've looked around for this on Google for a general timestamp method, but I've come up short. All I need is hour and minutes. Can anyone provide me with a method or point me in the right direction?
     
  2. Offline

    chasechocolate

    Current time? Use GregorianCalendars and gc.setTimeInMillis(System.currentTimeMillis()).
     
  3. Offline

    ohtwo

    I should add that I need to be able to compare times. I don't mind making my own methods for it as long as it isn't too complicated.
     
  4. Offline

    chasechocolate

    I would stick with milliseconds, they are used in most Java time-related methods.
     
  5. Offline

    kreashenz

    Use milliseconds and use the multiply(*) or divide(/) or whatever to get to the amount of seconds/hours you want.
     
Thread Status:
Not open for further replies.

Share This Page