cgnuino
CgnStopwatch.cpp
1 
11 #include "Arduino.h"
12 #include "cgnuino.h"
13 
18  from = millis();
19 }
20 
24 uint32_t CgnStopwatch::lap() {
25  uint32_t tmp;
26  tmp = millis() - from;
27  from = millis();
28  return tmp;
29 }
30 
34 uint32_t CgnStopwatch::get() {
35  return millis() - from;
36 }
37 
38 
uint32_t lap()
Shows elapsed time in [ms] and resart the clock.
uint32_t get()
Shows elapsed time in [ms] without resarting the clock.
CgnStopwatch()
Constructor.