![](/media/cache/profiles/DSC_0020.jpg.50x50_q85.jpg)
a pacemaker
Diff: clock.cpp
- Revision:
- 0:9e97accb2a4c
- Child:
- 1:446bd28a1f19
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/clock.cpp Wed Oct 26 02:06:02 2016 +0000 @@ -0,0 +1,17 @@ +#include "clock.h" + +Ticker tick; +double counter = 0; + +void start_clock(void){ + tick.attach(&count_time, 0.0001); + } + +void count_time(void){ + counter += 0.0001; + } + +double get_time(void){ + return counter; + } + \ No newline at end of file