Duration.ToMillis Method

Definition

Converts this duration to the total length in milliseconds.

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

Returns

the total length of the duration in milliseconds

Attributes

Remarks

Converts this duration to the total length in milliseconds.

If this duration is too large to fit in a long milliseconds, then an exception is thrown.

If this duration has greater than millisecond precision, then the conversion will drop any excess precision information as though the amount in nanoseconds was subject to integer division by one million.

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

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