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

后端 未结 5 688
既然无缘
既然无缘 2020-11-27 04:26

https://docs.oracle.com/javase/6/docs/api/java/lang/System.html#currentTimeMillis() says:

Returns the current time in milliseconds. Note that while th

5条回答
  •  抹茶落季
    2020-11-27 05:13

    @Mark Rushakoff is right; nanoTime() might be slightly more reliable.

    Addendum: note these caveats, cited by @Steven Schlansker.

提交回复
热议问题