Will Sytem.currentTimeMillis always return a value >= previous calls?

Posted by 1984isnotamanual on Stack Overflow See other posts from Stack Overflow or by 1984isnotamanual
Published on 2010-06-05T00:37:23Z Indexed on 2010/06/05 8:52 UTC
Read the original article Hit count: 152

Filed under:
|

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html#currentTimeMillis() says:

Returns the current time in milliseconds. Note that while the unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger. For example, many operating systems measure time in units of tens of milliseconds.

It is not clear to me if I am guaranteed that this code will always print ever increasing (or the same) numbers.

while (1) { 
    System.out.println(System.currentTimeMillis() );
}

© Stack Overflow or respective owner

Related posts about java

Related posts about linux