NetBurner 3.5.0
PDF Version |
|
Stopwatch for timing events. More...
#include <stopwatch.h>
Public Member Functions | |
StopWatch (int timer_number=FIRST_UNUSED_TIMER) | |
Create a stopwatch object. | |
void | Start () |
Start the stopwatch. | |
void | Clear () |
Clear the stopwatch count. | |
unsigned long long | Stop () |
Stop the StopWatch. | |
unsigned long long | GetTime () |
Get the StopWatch time. | |
double | CountResolution () |
Returns the value of one StopWatch tick time. | |
double | Convert (unsigned long long) |
Convert a time or interval from an unsigned long long to double floatl. | |
Stopwatch for timing events.
StopWatch::StopWatch | ( | int | timer_number = FIRST_UNUSED_TIMER | ) |
Create a stopwatch object.
The timer number can be ignored on platforms that have a permanently allocated timer for the RTOS and CPU frequency.
timer_number | Optional. Specifies the timer to use. If no timer is specified, the first unused timer will be selected. |
void StopWatch::Clear | ( | ) |
Clear the stopwatch count.
Clear the StopWatch count
double StopWatch::Convert | ( | unsigned long long | ) |
Convert a time or interval from an unsigned long long to double floatl.
Elapsed | time as a floating point number |
double StopWatch::CountResolution | ( | ) |
Returns the value of one StopWatch tick time.
The | value of one stopwatch tick |
unsigned long long StopWatch::GetTime | ( | ) |
Get the StopWatch time.
Elapsed | time. Will work even if stopwatch is running. |
void StopWatch::Start | ( | ) |
Start the stopwatch.
Start the StopWatch timer
unsigned long long StopWatch::Stop | ( | ) |
Stop the StopWatch.
Elapsed | time |