cgnuino
|
Measures time difference in milliseconds. More...
#include <cgnuino.h>
Public Member Functions | |
CgnStopwatch () | |
Constructor. | |
uint32_t | lap () |
Shows elapsed time in [ms] and resart the clock. | |
uint32_t | get () |
Shows elapsed time in [ms] without resarting the clock. | |
In behavioral tasks, it is incredibly common for you to count elapsed time from a given origin. Being self-explanatory from its name, CgnStopwatch class works as a stopwatch for that faculty. After construction, call lap
method to obtain the time length from the current origin, and then resetting the clock (i.e., set current time point as a new origin). Use get
method to check the clock while maintaining the present origin.