NetBurner 3.5.6
PDF Version
stopwatch.h
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
103#ifndef _NB_STOPWATCH_H
104#define _NB_STOPWATCH_H
105
106#include <constants.h>
107
138{
139 unsigned long long ref_start;
140 unsigned long long elapsed;
141 bool bRunning;
142
143 public:
174 StopWatch(int timer_number = FIRST_UNUSED_TIMER);
175
239 void Start(bool clear_count = false);
240
277 void Clear();
278
324 unsigned long long Stop();
325
411 unsigned long long GetTime();
412
480
587 double Convert(unsigned long long ticks);
588};
589
590#endif
591
High-resolution stopwatch timer for precise event timing and performance measurement.
Definition stopwatch.h:138
double Convert(unsigned long long ticks)
Convert timer ticks to seconds.
unsigned long long GetTime()
Get the current elapsed time without stopping the timer.
void Clear()
Clear the accumulated elapsed time.
void Start(bool clear_count=false)
Start or resume the stopwatch timer.
StopWatch(int timer_number=FIRST_UNUSED_TIMER)
Construct a stopwatch object with optional timer selection.
unsigned long long Stop()
Stop the stopwatch and return elapsed time.
double CountResolution()
Get the resolution of a single timer tick in seconds.