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.
Task.cpp
00001 00002 #include "Task.h" 00003 00004 Task::Task() 00005 { 00006 interval = DEFAULT_INTERVAL; 00007 } 00008 00009 Task::Task(int _interval) 00010 { 00011 interval = _interval; 00012 } 00013 00014 void Task::start() 00015 { 00016 ticker.attach_us(this, &Task::preTick, interval); 00017 running = true; 00018 } 00019 00020 00021 void Task::preTick() 00022 { 00023 this->tick(); 00024 } 00025 00026 void Task::stop() 00027 { 00028 ticker.detach(); 00029 running = false; 00030 } 00031
Generated on Wed Jul 13 2022 20:54:05 by
1.7.2