【发布时间】:2013-12-10 14:56:33
【问题描述】:
当使用 System. currentTimeMillis() 即the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC,另一个是使用 System.nanoTime() 获取的,这意味着它是current value of the running Java Virtual Machine's high-resolution time source, in nanoseconds。
我该怎么做?
【问题讨论】:
-
减去它们?我不明白你的问题。
-
它们是数字...减去它们?
-
System.nanoTime() 给出相对于任意时间点的时间戳,用于表示经过的时间,而不是明确的预定义时间点。