Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Task.cpp
- Revision:
- 1:e95b703c6ad7
- Parent:
- 0:e381c3adaa04
diff -r e381c3adaa04 -r e95b703c6ad7 Task.cpp
--- a/Task.cpp Fri Jan 14 19:51:13 2011 +0000
+++ b/Task.cpp Fri Jan 14 20:04:13 2011 +0000
@@ -14,10 +14,18 @@
void Task::start()
{
ticker.attach_us(this, &Task::preTick, interval);
+ running = true;
}
void Task::preTick()
{
this->tick();
-}
\ No newline at end of file
+}
+
+void Task::stop()
+{
+ ticker.detach();
+ running = false;
+}
+