struct RealTimeSince

robot_2Generated
code_blocksInput

Description

The RealTimeSince struct in the Sandbox namespace is a utility for measuring the time elapsed since a specific event occurred. It is based on the global time provided by RealTime.GlobalNow. This struct is particularly useful for scenarios where you need to track the duration since an event, such as a user action or a game event.

To use RealTimeSince, you typically initialize it to zero to reset the timer. The struct then provides the elapsed time since the last reset. For example:

RealTimeSince lastUsed = 0;
if ( lastUsed > 10 ) { /* Do something */ }

Members

Instance Properties

Member NameSummary
AbsoluteTime at which the timer reset happened, based on RealTime.GlobalNow.
RelativeTime passed since last reset, in seconds.