System.currentTimeMillis(); If I change system time

后端 未结 3 783
一向
一向 2021-01-11 14:51

If I use System.currentTimeMillis() at 00:00 and I get X value.

Then I set the clock back one hour, and after one hour i call System.

3条回答
  •  粉色の甜心
    2021-01-11 15:34

    In a nutshell, whenever you change system time, the value returned by System.currentTimeMillis() will change accordingly.

    This is in contrast to System.nanoTime().

提交回复
热议问题