[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThe latest version of NanoClock is 2.46.1, with numerous previous versions available for reference, dating back to version 2.1.2.\u003c/p\u003e\n"],["\u003cp\u003eNanoClock is a default implementation of the ApiClock interface and uses \u003ccode\u003eSystem.nanoTime()\u003c/code\u003e for time calculations, as well as implementing the Serializable interface.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits methods from the \u003ccode\u003ejava.lang.Object\u003c/code\u003e class, such as \u003ccode\u003eclone()\u003c/code\u003e, \u003ccode\u003eequals()\u003c/code\u003e, \u003ccode\u003egetClass()\u003c/code\u003e, and more.\u003c/p\u003e\n"],["\u003cp\u003eNanoClock provides static and instance methods to retrieve high-resolution time in milliseconds (\u003ccode\u003emillisTime()\u003c/code\u003e) and nanoseconds (\u003ccode\u003enanoTime()\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThe static method \u003ccode\u003egetDefaultClock()\u003c/code\u003e returns the current instance of \u003ccode\u003eApiClock\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Class NanoClock (2.52.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.52.0 (latest)](/java/docs/reference/api-common/latest/com.google.api.core.NanoClock)\n- [2.51.2](/java/docs/reference/api-common/2.51.2/com.google.api.core.NanoClock)\n- [2.50.0](/java/docs/reference/api-common/2.50.0/com.google.api.core.NanoClock)\n- [2.49.0](/java/docs/reference/api-common/2.49.0/com.google.api.core.NanoClock)\n- [2.48.0](/java/docs/reference/api-common/2.48.0/com.google.api.core.NanoClock)\n- [2.46.1](/java/docs/reference/api-common/2.46.1/com.google.api.core.NanoClock)\n- [2.45.0](/java/docs/reference/api-common/2.45.0/com.google.api.core.NanoClock)\n- [2.44.0](/java/docs/reference/api-common/2.44.0/com.google.api.core.NanoClock)\n- [2.43.0](/java/docs/reference/api-common/2.43.0/com.google.api.core.NanoClock)\n- [2.42.1](/java/docs/reference/api-common/2.42.1/com.google.api.core.NanoClock)\n- [2.41.0](/java/docs/reference/api-common/2.41.0/com.google.api.core.NanoClock)\n- [2.40.0](/java/docs/reference/api-common/2.40.0/com.google.api.core.NanoClock)\n- [2.38.0](/java/docs/reference/api-common/2.38.0/com.google.api.core.NanoClock)\n- [2.37.1](/java/docs/reference/api-common/2.37.1/com.google.api.core.NanoClock)\n- [2.36.0](/java/docs/reference/api-common/2.36.0/com.google.api.core.NanoClock)\n- [2.35.0](/java/docs/reference/api-common/2.35.0/com.google.api.core.NanoClock)\n- [2.34.0](/java/docs/reference/api-common/2.34.0/com.google.api.core.NanoClock)\n- [2.33.0](/java/docs/reference/api-common/2.33.0/com.google.api.core.NanoClock)\n- [2.32.0](/java/docs/reference/api-common/2.32.0/com.google.api.core.NanoClock)\n- [2.31.1](/java/docs/reference/api-common/2.31.1/com.google.api.core.NanoClock)\n- [2.30.0](/java/docs/reference/api-common/2.30.0/com.google.api.core.NanoClock)\n- [2.29.1](/java/docs/reference/api-common/2.29.1/com.google.api.core.NanoClock)\n- [2.28.0](/java/docs/reference/api-common/2.28.0/com.google.api.core.NanoClock)\n- [2.26.0](/java/docs/reference/api-common/2.26.0/com.google.api.core.NanoClock)\n- [2.25.0](/java/docs/reference/api-common/2.25.0/com.google.api.core.NanoClock)\n- [2.24.0](/java/docs/reference/api-common/2.24.0/com.google.api.core.NanoClock)\n- [2.22.0](/java/docs/reference/api-common/2.22.0/com.google.api.core.NanoClock)\n- [2.21.0](/java/docs/reference/api-common/2.21.0/com.google.api.core.NanoClock)\n- [2.20.0](/java/docs/reference/api-common/2.20.0/com.google.api.core.NanoClock)\n- [2.19.0](/java/docs/reference/api-common/2.19.0/com.google.api.core.NanoClock)\n- [2.18.0](/java/docs/reference/api-common/2.18.0/com.google.api.core.NanoClock)\n- [2.17.1](/java/docs/reference/api-common/2.17.1/com.google.api.core.NanoClock)\n- [2.16.0](/java/docs/reference/api-common/2.16.0/com.google.api.core.NanoClock)\n- [2.15.1](/java/docs/reference/api-common/2.15.1/com.google.api.core.NanoClock)\n- [2.14.1](/java/docs/reference/api-common/2.14.1/com.google.api.core.NanoClock)\n- [2.13.1](/java/docs/reference/api-common/2.13.1/com.google.api.core.NanoClock)\n- [2.7.0](/java/docs/reference/api-common/2.7.0/com.google.api.core.NanoClock)\n- [2.6.3](/java/docs/reference/api-common/2.6.3/com.google.api.core.NanoClock)\n- [2.5.0](/java/docs/reference/api-common/2.5.0/com.google.api.core.NanoClock)\n- [2.4.0](/java/docs/reference/api-common/2.4.0/com.google.api.core.NanoClock)\n- [2.3.1](/java/docs/reference/api-common/2.3.1/com.google.api.core.NanoClock)\n- [2.1.2](/java/docs/reference/api-common/2.1.2/com.google.api.core.NanoClock) \n\n public final class NanoClock implements ApiClock, Serializable\n\nDefault implementation of the ApiClock interface, using call to System.nanoTime(). \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e NanoClock \n\nImplements\n----------\n\n[ApiClock](/java/docs/reference/api-common/latest/com.google.api.core.ApiClock), [Serializable](https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html) \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nStatic Methods\n--------------\n\n### getDefaultClock()\n\n public static ApiClock getDefaultClock()\n\nMethods\n-------\n\n### millisTime()\n\n public final long millisTime()\n\nReturns the current value of this clock's high-resolution time source, in milliseconds.\n\n### nanoTime()\n\n public final long nanoTime()\n\nReturns the current value of this clock's high-resolution time source, in nanoseconds."]]