dsfml.system.clock

Clock is a lightweight class for measuring time.

Its provides the most precise time that the underlying OS can achieve (generally microseconds or nanoseconds). It also ensures monotonicity, which means that the returned time can never go backward, even if the system time is changed.

Members

Classes

Clock
class Clock

Utility class that measures the elapsed time.

Examples

1 auto clock = Clock();
2 ...
3 Duration duration1 = clock.getElapsedTime();
4 ...
5 Duration duration2 = clock.restart();

$(PARA The Duration value ($(I core.time.Duration)) returned by the clock can then be converted to a number of seconds, milliseconds or even microseconds.)

See Also

Meta