Sdílet prostřednictvím


FileTime.To(TimeUnit) Method

Definition

Returns the value at the given unit of granularity.

[Android.Runtime.Register("to", "(Ljava/util/concurrent/TimeUnit;)J", "", ApiSince=26)]
public long To (Java.Util.Concurrent.TimeUnit? unit);
[<Android.Runtime.Register("to", "(Ljava/util/concurrent/TimeUnit;)J", "", ApiSince=26)>]
member this.To : Java.Util.Concurrent.TimeUnit -> int64

Parameters

unit
TimeUnit

the unit of granularity for the return value

Returns

value in the given unit of granularity, since the epoch since the epoch (1970-01-01T00:00:00Z); can be negative

Attributes

Remarks

Returns the value at the given unit of granularity.

Conversion from a coarser granularity that would numerically overflow saturate to Long.MIN_VALUE if negative or Long.MAX_VALUE if positive.

Java documentation for java.nio.file.attribute.FileTime.to(java.util.concurrent.TimeUnit).

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