Class UnityTimeProvider
- Namespace
- R3
public class UnityTimeProvider : TimeProviderInheritance
Inherited Members
Fields
EarlyUpdate
public static readonly TimeProvider EarlyUpdateField Value
EarlyUpdateIgnoreTimeScale
public static readonly TimeProvider EarlyUpdateIgnoreTimeScaleField Value
EarlyUpdateRealtime
public static readonly TimeProvider EarlyUpdateRealtimeField Value
FixedUpdate
public static readonly TimeProvider FixedUpdateField Value
FixedUpdateIgnoreTimeScale
public static readonly TimeProvider FixedUpdateIgnoreTimeScaleField Value
FixedUpdateRealtime
public static readonly TimeProvider FixedUpdateRealtimeField Value
Initialization
public static readonly TimeProvider InitializationField Value
InitializationIgnoreTimeScale
public static readonly TimeProvider InitializationIgnoreTimeScaleField Value
InitializationRealtime
public static readonly TimeProvider InitializationRealtimeField Value
PostLateUpdate
public static readonly TimeProvider PostLateUpdateField Value
PostLateUpdateIgnoreTimeScale
public static readonly TimeProvider PostLateUpdateIgnoreTimeScaleField Value
PostLateUpdateRealtime
public static readonly TimeProvider PostLateUpdateRealtimeField Value
PreLateUpdate
public static readonly TimeProvider PreLateUpdateField Value
PreLateUpdateIgnoreTimeScale
public static readonly TimeProvider PreLateUpdateIgnoreTimeScaleField Value
PreLateUpdateRealtime
public static readonly TimeProvider PreLateUpdateRealtimeField Value
PreUpdate
public static readonly TimeProvider PreUpdateField Value
PreUpdateIgnoreTimeScale
public static readonly TimeProvider PreUpdateIgnoreTimeScaleField Value
PreUpdateRealtime
public static readonly TimeProvider PreUpdateRealtimeField Value
TimeUpdate
public static readonly TimeProvider TimeUpdateField Value
TimeUpdateIgnoreTimeScale
public static readonly TimeProvider TimeUpdateIgnoreTimeScaleField Value
TimeUpdateRealtime
public static readonly TimeProvider TimeUpdateRealtimeField Value
Update
public static readonly TimeProvider UpdateField Value
UpdateIgnoreTimeScale
public static readonly TimeProvider UpdateIgnoreTimeScaleField Value
UpdateRealtime
public static readonly TimeProvider UpdateRealtimeField Value
Methods
CreateTimer(TimerCallback, object, TimeSpan, TimeSpan)
Creates a new System.Threading.ITimer instance, using System.TimeSpan values to measure time intervals.
public override ITimer CreateTimer(TimerCallback callback, object state, TimeSpan dueTime, TimeSpan period)Parameters
callbackTimerCallback-
A delegate representing a method to be executed when the timer fires. The method should be reentrant, as it may be invoked simultaneously on two threads if the timer fires again while a previous callback is still being handled.
stateobject-
An object to be passed to the
callback. This may be null. dueTimeTimeSpan-
The amount of time to delay before
callbackis invoked. Specify System.Threading.Timeout.InfiniteTimeSpan to prevent the timer from starting. Specify System.TimeSpan.Zero to start the timer immediately. periodTimeSpan-
The time interval between invocations of
callback. Specify System.Threading.Timeout.InfiniteTimeSpan to disable periodic signaling.
Returns
- ITimer
-
The newly created System.Threading.ITimer instance.
Exceptions
- ArgumentNullException
-
callbackis null. - ArgumentOutOfRangeException
-
The number of milliseconds in the value of
dueTimeorperiodis negative and not equal to System.Threading.Timeout.Infinite, or is greater than Int32.MaxValue.
GetTimestamp()
Gets the current high-frequency value designed to measure small time intervals with high accuracy in the timer mechanism.
public override long GetTimestamp()Returns
- long
-
A long integer representing the high-frequency counter value of the underlying timer mechanism.