Skip to main content
Version: Java (Groovy)

formatDurationNanos

formatDurationNanos returns a nanosecond duration formatted as a [-]PThhh:mm:ss.nnnnnnnnn string.

Syntax

formatDurationNanos(nanos)

Parameters

ParameterTypeDescription
nanoslong

The duration in nanoseconds.

Returns

A duration, formatted as a [-]PThhh:mm:ss.nnnnnnnnn string.

Examples

nanos = 3456000

println formatDurationNanos(nanos)