Compartilhar via


Duration.Nano Property

Definition

Gets the number of nanoseconds within the second in this duration.

public int Nano { [Android.Runtime.Register("getNano", "()I", "", ApiSince=26)] get; }
[<get: Android.Runtime.Register("getNano", "()I", "", ApiSince=26)>]
member this.Nano : int

Property Value

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

Attributes

Remarks

Gets the number of nanoseconds within the second in this 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 this method and #getSeconds().

A Duration represents a directed distance between two points on the time-line. A negative duration is expressed by the negative sign of the seconds part. A duration of -1 nanosecond is stored as -1 seconds plus 999,999,999 nanoseconds.

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

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