RealTimeUntilclass

A convenience struct to easily manage a time countdown, based on `Sandbox.RealTime.GlobalNow`. Typical usage would see you assigning to a variable of this type a necessary amount of seconds. Then the struct would return the time countdown, or can be used as a bool i.e.: RealTimeUntil nextAttack = 10; if ( nextAttack ) { /*Do something*/ }

objectRealTimeUntil
Namespace
Sandbox
Assembly
Sandbox.System
Declaration
public sealed struct Sandbox.RealTimeUntil

Properties4

Showing 4 properties

public double Sandbox.RealTimeUntil.Absolute { get; set; }PUBLICGETSET

Time to which we are counting down to, based on `Sandbox.RealTime.GlobalNow`.

Returns:double

public double Sandbox.RealTimeUntil.Fraction { get; set; }PUBLICGETSET

The countdown, but as a fraction, i.e. a value from 0 (start of countdown) to 1 (end of countdown)

Returns:double

public double Sandbox.RealTimeUntil.Passed { get; set; }PUBLICGETSET

Amount of seconds passed since the countdown started.

Returns:double

public double Sandbox.RealTimeUntil.Relative { get; set; }PUBLICGETSET

The actual countdown, in seconds.

Returns:double

On this page