Class NanoClock (2.13.1) Stay organized with collections Save and categorize content based on your preferences.
publicfinalclassNanoClockimplementsApiClock,SerializableDefault implementation of the ApiClock interface, using call to System.nanoTime().
Inherited Members
Static Methods
getDefaultClock()
publicstaticApiClockgetDefaultClock()| Returns | |
|---|---|
| Type | Description |
ApiClock | |
Methods
millisTime()
publicfinallongmillisTime()Returns the current value of this clock's high-resolution time source, in milliseconds.
| Returns | |
|---|---|
| Type | Description |
long | |
nanoTime()
publicfinallongnanoTime()Returns the current value of this clock's high-resolution time source, in nanoseconds.
| Returns | |
|---|---|
| Type | Description |
long | |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-01-31 UTC.