Frobby 0.10.0
Loading...
Searching...
No Matches
Timer Class Reference

#include <Timer.h>

Public Member Functions

void reset ()
unsigned long getMilliseconds () const
void print (FILE *out) const

Detailed Description

Measures spans of CPU time.

The internal record of time can overflow quickly. If clock_t is 32 bits unsigned and CLOCKS_PER_TIC is one million then overflow will occur after 71 minutes.

Member Function Documentation

◆ getMilliseconds()

unsigned long Timer::getMilliseconds ( ) const

Returns the number of CPU milliseconds since the last reset. See class description for time span overflow limitations.

◆ print()

void Timer::print ( FILE * out) const

Prints the elapsed time in a human readable format. See class description for time span overflow limitations.

◆ reset()

void Timer::reset ( )
inline

Resets the amount of elapsed CPU time to zero.


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