SysTimeProvider

Standard implementation of the current time provider, which simply returns the current system time.

class SysTimeProvider : CurrentTimeProvider {}

Members

Functions

now
SysTime now()
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From CurrentTimeProvider

now
SysTime now()

Gets the current system time.

Examples

Tests the functionality of the system time provider.

import core.thread;
auto provider = new SysTimeProvider;
for (int i = 0; i < 10; i++) {
    auto duration = provider.now - Clock.currTime;
    assert(duration < msecs(100), "System time provider's time does not match expected.");
    Thread.sleep(msecs(10));
}

Meta