NetBurner 3.5.0
PDF Version
 
StopWatch Class Reference

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.
 

Detailed Description

Stopwatch for timing events.

Constructor & Destructor Documentation

◆ StopWatch()

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.

Parameters
timer_numberOptional. Specifies the timer to use. If no timer is specified, the first unused timer will be selected.

Member Function Documentation

◆ Clear()

void StopWatch::Clear ( )

Clear the stopwatch count.

Clear the StopWatch count

◆ Convert()

double StopWatch::Convert ( unsigned long long )

Convert a time or interval from an unsigned long long to double floatl.

Return values
Elapsedtime as a floating point number

◆ CountResolution()

double StopWatch::CountResolution ( )

Returns the value of one StopWatch tick time.

Return values
Thevalue of one stopwatch tick

◆ GetTime()

unsigned long long StopWatch::GetTime ( )

Get the StopWatch time.

Return values
Elapsedtime. Will work even if stopwatch is running.

◆ Start()

void StopWatch::Start ( )

Start the stopwatch.

Start the StopWatch timer

◆ Stop()

unsigned long long StopWatch::Stop ( )

Stop the StopWatch.

Return values
Elapsedtime

The documentation for this class was generated from the following file: