Aracılığıyla paylaş


Duration.Seconds Property

Definition

Gets the number of seconds in this duration.

public long Seconds { [Android.Runtime.Register("getSeconds", "()J", "", ApiSince=26)] get; }
[<get: Android.Runtime.Register("getSeconds", "()J", "", ApiSince=26)>]
member this.Seconds : int64

Property Value

the whole seconds part of the length of the duration, positive or negative

Attributes

Remarks

Gets the number of seconds 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 #getNano().

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.getSeconds().

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