Skip to content

Commit 3b33580

Browse files
committed
README: document cancel all usage of cancel()
1 parent 3ce1c35 commit 3b33580

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ auto task = timer.in(delay, function_to_call);
5656
timer.cancel(task);
5757
```
5858

59+
To **cancel** all *Task*s
60+
```cpp
61+
timer.cancel();
62+
```
63+
5964
Be fancy with **lambdas**
6065
```cpp
6166
timer.in(1000, [](void*) -> bool { return false; });
@@ -99,6 +104,8 @@ every(unsigned long interval, handler_t handler, T opaque = T());
99104
100105
/* Cancel a timer task */
101106
void cancel(Timer<>::Task &task);
107+
/* Cancel all tasks */
108+
void cancel();
102109
103110
/* Returns the ticks until next event, or 0 if none */
104111
unsigned long ticks();

0 commit comments

Comments
 (0)