StopWatch.start

Starts the StopWatch.

start should not be called if the StopWatch is already running.

struct StopWatch
@safe nothrow @nogc
void
start
()

Examples

import core.thread : Thread;

StopWatch sw;
assert(!sw.running);
assert(sw.peek() == Duration.zero);
sw.start();
assert(sw.running);
Thread.sleep(usecs(1));
assert(sw.peek() > Duration.zero);

Meta