MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / setResolution

Method setResolution

libraries/Stopwatch_RT/StopWatch.cpp:88–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86
87
88void StopWatch::setResolution(const enum Resolution resolution)
89{
90 reset();
91 _resolution = resolution;
92 switch(_resolution)
93 {
94 case MICROS:
95 _gettime = _micros;
96 break;
97
98 case SECONDS:
99 _gettime = seconds;
100 break;
101
102 case MINUTES:
103 _gettime = minutes;
104 break;
105
106 case MILLIS:
107 default:
108 _gettime = _millis;
109 _resolution = MILLIS; // for default!
110 break;
111 }
112}
113
114
115////////////////////////////////////////////////

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36