Share via


Duration.ToNanosPart Method

Definition

Get the nanoseconds part within seconds of the duration.

[Android.Runtime.Register("toNanosPart", "()I", "", ApiSince=31)]
public int ToNanosPart ();
[<Android.Runtime.Register("toNanosPart", "()I", "", ApiSince=31)>]
member this.ToNanosPart : unit -> int

Returns

the nanoseconds within the second part of the length of the duration, from 0 to 999,999,999

Attributes

Remarks

Get the nanoseconds part within seconds of the duration.

The length of the duration is stored using two fields - seconds and nanoseconds. The nanoseconds part is a value from 0 to 999,999,999 that is an adjustment to the length in seconds. The total duration is defined by calling #getNano() and #getSeconds().

This instance is immutable and unaffected by this method call.

Added in 9.

Java documentation for java.time.Duration.toNanosPart().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to