Skip to main content
Version: Java (Groovy)

nanosToSeconds

nanosToSeconds returns the number of seconds equivalent to the specified nanoseconds value.

Syntax

nanosToSeconds(nanos)

Parameters

ParameterTypeDescription
nanoslong

The amount of nanoseconds to convert to seconds.

Returns

The number of seconds equivalent to the specified nanoseconds value. Null input values will return NULL_LONG.

Examples

nanos = 5000
println nanos

println nanosToSeconds(nanos)