다음을 통해 공유


IInstantSource.Millis Method

Definition

Gets the current millisecond instant of the source.

[Android.Runtime.Register("millis", "()J", "GetMillisHandler:Java.Time.IInstantSource, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=34)]
public virtual long Millis ();
[<Android.Runtime.Register("millis", "()J", "GetMillisHandler:Java.Time.IInstantSource, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=34)>]
abstract member Millis : unit -> int64
override this.Millis : unit -> int64

Returns

the current millisecond instant from this source, measured from the Java epoch of 1970-01-01T00:00Z (UTC), not null

Attributes

Remarks

Gets the current millisecond instant of the source.

This returns the millisecond-based instant, measured from 1970-01-01T00:00Z (UTC). This is equivalent to the definition of System#currentTimeMillis().

Most applications should avoid this method and use Instant to represent an instant on the time-line rather than a raw millisecond value. This method is provided to allow the use of the source in high performance use cases where the creation of an object would be unacceptable.

Java documentation for java.time.InstantSource.millis().

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