diff --git a/base/Base_compiler.jl b/base/Base_compiler.jl index db3ebb0232e38..70e3c80df4786 100644 --- a/base/Base_compiler.jl +++ b/base/Base_compiler.jl @@ -158,8 +158,12 @@ end """ time_ns() -> UInt64 -Get the time in nanoseconds relative to some arbitrary time in the past. The primary use is for measuring the elapsed time -between two moments in time. +Get the time in nanoseconds relative to some machine-specific arbitrary time in the past. +The primary use is for measuring elapsed times during program execution. The return value is guaranteed to +be monotonic (mod 2⁶⁴) while the system is running, and is unaffected by clock drift or changes to local calendar time, +but it may change arbitrarily across system reboots or suspensions. + +(Although the returned time is always in nanoseconds, the timing resolution is platform-dependent.) """ time_ns() = ccall(:jl_hrtime, UInt64, ())