Condividi tramite


Duration.ToHours Method

Definition

Gets the number of hours in this duration.

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

Returns

the number of hours in the duration, may be negative

Attributes

Remarks

Gets the number of hours in this duration.

This returns the total number of hours in the duration by dividing the number of seconds by 3600.

This instance is immutable and unaffected by this method call.

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

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