API ReferenceSandbox
public sealed struct Sandbox.RealTimeSince
A convenience struct to easily measure time since an event last happened, based on `Sandbox.RealTime.GlobalNow`. Typical usage would see you assigning 0 to a variable of this type to reset the timer. Then the struct would return time since the last reset. i.e.: RealTimeSince lastUsed = 0; if ( lastUsed > 10 ) { /*Do something*/ }
Related Guides
Broader workflow and conceptual references connected to this API.
Properties
Showing 2 properties
public double Sandbox.RealTimeSince.Absolute { get; set; }
Time at which the timer reset happened, based on `Sandbox.RealTime.GlobalNow`.
public float Sandbox.RealTimeSince.Relative { get; set; }
Time passed since last reset, in seconds.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.System |
| Doc ID | T:Sandbox.RealTimeSince |