Skip to content

Commit f11b669

Browse files
committed
src:arduino-timer: constify ticks method
1 parent fda5ccb commit f11b669

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/arduino-timer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ class Timer {
121121

122122
/* Ticks until the next event */
123123
unsigned long
124-
ticks()
124+
ticks() const
125125
{
126126
unsigned long ticks = (unsigned long)-1, elapsed;
127127
const unsigned long start = time_func();
128128

129129
for (size_t i = 0; i < max_tasks; ++i) {
130-
struct task * const task = &tasks[i];
130+
const struct task * const task = &tasks[i];
131131

132132
if (task->handler) {
133133
const unsigned long t = time_func();

0 commit comments

Comments
 (0)