Sdílet prostřednictvím


Duration.ToSeconds Method

Definition

Gets the number of seconds in this duration.

[Android.Runtime.Register("toSeconds", "()J", "", ApiSince=31)]
public long ToSeconds ();
[<Android.Runtime.Register("toSeconds", "()J", "", ApiSince=31)>]
member this.ToSeconds : unit -> int64

Returns

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

Attributes

Remarks

Gets the number of seconds in this duration.

This returns the total number of whole seconds in the duration.

This instance is immutable and unaffected by this method call.

Added in 9.

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

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