Compartir a través de


TimeUnit.ToHours(Int64) Method

Definition

Equivalent to #convert(long, TimeUnit) HOURS.convert(duration, this).

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

Parameters

duration
Int64

the duration

Returns

the converted duration, or Long.MIN_VALUE if conversion would negatively overflow, or Long.MAX_VALUE if it would positively overflow.

Attributes

Remarks

Equivalent to #convert(long, TimeUnit) HOURS.convert(duration, this).

Added in 1.6.

Java documentation for java.util.concurrent.TimeUnit.toHours(long).

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