Could System.nanoTime () be 0 in Java?

is like this, I would like to ask a source code question, that is, about the Worker subclass of the HashedWheelTimer class in netty, why is it written like this when initializing startime?

I don"t understand. Is this System.nanoTime () equal to 0 in some cases?
clipboard.png

Mar.06,2021

has not used this native method. It is said on the Internet that it may be 0
Netty tool class HashedWheelTimer source code


has just been Baidu, and found that this System.nanoTime () can indeed be 0.
this System.nanoTime () is not calculated as 1970 as the first year, but is timed by the clock cycle of the cpu core, and its start time is uncertain.
reference: http://hold-on.iteye.com/blog.

Menu