Skip to main content
Version: Java (Groovy)

currentTimeNanos

currentTimeNanos returns the number of nanoseconds since the epoch (1970-01-01T00:00:00Z).

The resolution is greater than or equal to currentTimeMicros and currentTimeMillis.

Syntax

currentTimeNanos()

Parameters

This method takes no arguments.

Returns

The number of nanoseconds since the epoch (1970-01-01T00:00:00Z).

Examples

println currentClock().currentTimeNanos()