cgnuino
Main Page
Classes
Examples
src
CgnStopwatch.cpp
1
11
#include "Arduino.h"
12
#include "cgnuino.h"
13
17
CgnStopwatch::CgnStopwatch
() {
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
CgnStopwatch::lap
uint32_t lap()
Shows elapsed time in [ms] and resart the clock.
Definition:
CgnStopwatch.cpp:24
CgnStopwatch::get
uint32_t get()
Shows elapsed time in [ms] without resarting the clock.
Definition:
CgnStopwatch.cpp:34
CgnStopwatch::CgnStopwatch
CgnStopwatch()
Constructor.
Definition:
CgnStopwatch.cpp:17
Generated on Thu Oct 15 2020 16:53:38 for cgnuino by
1.8.11