Struct WaitForRealSeconds
A coroutine yield instruction that waits for a specified duration on the owning context's deterministic clock.
public readonly struct WaitForRealSeconds : ILockedYieldInstruction, IEnumerator, IDisposable
- Implements
- Inherited Members
Remarks
Uses a wide timestamp deadline, preserving the requested duration across frame-rate changes. Reading an instruction after context reset or disposal throws; reads never consume time. An unrepresentable deadline throws during construction.
Constructors
WaitForRealSeconds(GravitasWorldContext, Fixed64)
Creates an instruction that waits for a nonnegative duration on the context's deterministic clock.
public WaitForRealSeconds(GravitasWorldContext context, Fixed64 seconds)
Parameters
contextGravitasWorldContextsecondsFixed64
Properties
Context
Gets the deterministic world context that owns this instruction's clock.
public GravitasWorldContext Context { get; }
Property Value
Current
public object? Current { get; }
Property Value
KeepWaiting
Indicates if coroutine should be kept suspended.
public bool KeepWaiting { get; }
Property Value
Methods
Dispose()
public void Dispose()
MoveNext()
public bool MoveNext()
Returns
Reset()
public void Reset()