NetBurner 3.5.8
PDF Version
Toggle main menu visibility
stopwatch.h
1
/*NB_REVISION*/
2
3
/*NB_COPYRIGHT*/
4
11
102
103
#ifndef _NB_STOPWATCH_H
104
#define _NB_STOPWATCH_H
105
106
#include <constants.h>
107
137
class
StopWatch
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
479
double
CountResolution
();
480
587
double
Convert
(
unsigned
long
long
ticks);
588
};
589
590
#endif
591
StopWatch::Convert
double Convert(unsigned long long ticks)
Convert timer ticks to seconds.
StopWatch::GetTime
unsigned long long GetTime()
Get the current elapsed time without stopping the timer.
StopWatch::Clear
void Clear()
Clear the accumulated elapsed time.
StopWatch::Start
void Start(bool clear_count=false)
Start or resume the stopwatch timer.
StopWatch::StopWatch
StopWatch(int timer_number=FIRST_UNUSED_TIMER)
Construct a stopwatch object with optional timer selection.
StopWatch::Stop
unsigned long long Stop()
Stop the stopwatch and return elapsed time.
StopWatch::CountResolution
double CountResolution()
Get the resolution of a single timer tick in seconds.
nbrtos
include
stopwatch.h
Generated by
1.18.0