20#if !(defined(__linux__) || defined(__MACH__))
21#pragma message("WARNING: Platform not supported.")
26#pragma message("WARNING: Compiling dummy Stopwatch class (-DN2P2_NO_TIME).")
31#include <mach/mach_time.h>
50 void start(
bool newLoop =
true);
Implements a simple stopwatch on different platforms.
double getTotal() const
Return total time elapsed (of a stopped watch).
void reset()
Reset stopwatch (total and loop time zero, clock not running).
double stop()
Stop and return total time.
void start(bool newLoop=true)
Start the stopwatch.
double getLoop() const
Return time elapsed in last loop interval (of a stopped watch).
double loop()
Stop and return loop time.