You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: libClearCore/inc/SysTimer.h
+20-5Lines changed: 20 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -34,10 +34,13 @@ namespace ClearCore {
34
34
35
35
/**
36
36
\class SysTimer
37
-
\brief ClearCore system timer/stopwatch class
37
+
\brief Abstract stopwatch/timer base (Start/Elapsed/Completed) with selectable time base.
38
38
39
-
This class provides generic timer functionality that can be inherited to
40
-
use different time bases
39
+
<b>Use this when:</b> you want a stopwatch object (start, delay, completed, elapsed) and you’ll choose the time base via a derived class.
40
+
41
+
<b>Pick a derived class:</b>
42
+
- SysTimerMs for millisecond-scale delays
43
+
- SysTimerUs for microsecond-scale delays.
41
44
**/
42
45
classSysTimer {
43
46
@@ -135,7 +138,13 @@ class SysTimer {
135
138
136
139
/**
137
140
\class SysTimerMs
138
-
\brief ClearCore system timer/stopwatch class using millisecond time base
141
+
\brief Stopwatch/timer using millisecond time base (recommended for most timeouts).
142
+
143
+
<b>Use this when:</b> your delays/timeouts are human-scale (10 ms to minutes+), and you don’t need microsecond resolution.
144
+
145
+
<b>Time base:</b> milliseconds.
146
+
147
+
<b>Rollover guidance:</b> this timer will rollover every ~49.7 days - safe for long-running timers compared to microseconds (microsecond base rolls faster).
139
148
**/
140
149
classSysTimerMs : publicSysTimer {
141
150
@@ -168,7 +177,13 @@ class SysTimerMs : public SysTimer {
168
177
169
178
/**
170
179
\class SysTimerUs
171
-
\brief ClearCore system timer/stopwatch class using microsecond time base
180
+
\brief Stopwatch/timer using microsecond time base (short, high-resolution timing).
181
+
182
+
<b>Use this when:</b> you need short, tight timing (sub-millisecond delays, pulse measurement windows, quick debounces).
183
+
184
+
<b>Time base:</b> microseconds.
185
+
186
+
<b>Rollover caution:</b> this timer will rollover every ~71.5 minutes - best for shorter, more precise intervals.
0 commit comments