Udostępnij za pośrednictwem


Allocation.TimeStamp Property

Definition

Get the timestamp for the most recent buffer held by this Allocation.

public virtual long TimeStamp { [Android.Runtime.Register("getTimeStamp", "()J", "GetGetTimeStampHandler", ApiSince=24)] get; }
[<get: Android.Runtime.Register("getTimeStamp", "()J", "GetGetTimeStampHandler", ApiSince=24)>]
member this.TimeStamp : int64

Property Value

long Timestamp associated with the buffer held by the Allocation.

Attributes

Remarks

Get the timestamp for the most recent buffer held by this Allocation. The timestamp is guaranteed to be unique and monotonically increasing. Default value: -1. The timestamp will be updated after each #ioReceive ioReceive() call.

It can be used to identify the images by comparing the unique timestamps when used with android.hardware.camera2 APIs. Example steps: 1. Save android.hardware.camera2.TotalCaptureResult when the capture is completed. 2. Get the timestamp after #ioReceive ioReceive() call. 3. Comparing totalCaptureResult.get(CaptureResult.SENSOR_TIMESTAMP) with alloc.getTimeStamp().

Java documentation for android.renderscript.Allocation.getTimeStamp().

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