CurrentTimeMillis

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sugard
    New Member
    • Aug 2007
    • 50

    #1

    CurrentTimeMillis

    I have a program which needs to calculate some time. I have an initial time and an ending time. The difference in time is given in CurrentTimeMill is. how am i going to convert this into seconds please? i.e. the difference in time for example will be given 0.5 seconds.

    thanks
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by sugard
    I have a program which needs to calculate some time. I have an initial time and an ending time. The difference in time is given in CurrentTimeMill is. how am i going to convert this into seconds please? i.e. the difference in time for example will be given 0.5 seconds.

    thanks
    Simply divide that number (end-start) by 1000.0. Note the double type of 1000.0,
    don't use 1000 (the integer version of the same number).

    kind regards,

    Jos

    Comment

    Working...