//--------------------------------------------------------------------------- void StopWatch::start() { if (! _running) { _tpStart = myClock() - _tmElapsed; } _running = true; }
//--------------------------------------------------------------------------- unsigned long StopWatch::getValue() const { if (_running) return myClock() - _tpStart; else return _tmElapsed; }
//--------------------------------------------------------------------------- void StopWatch::stop() { _running = false; _tmElapsed = myClock() - _tpStart; }
int main(void) { myClock(); return 0; }