a pacemaker

Dependencies:   mbed

Revision:
1:446bd28a1f19
Parent:
0:9e97accb2a4c
Child:
2:ab8469051a2d
--- a/clock.cpp	Wed Oct 26 02:06:02 2016 +0000
+++ b/clock.cpp	Wed Oct 26 13:42:57 2016 +0000
@@ -3,8 +3,9 @@
 Ticker tick;
 double counter = 0;
 
-void start_clock(void){
+int start_clock(void){
     tick.attach(&count_time, 0.0001);
+    return 1;
     }
     
 void count_time(void){
@@ -14,4 +15,11 @@
 double get_time(void){
     return counter;
     }
+    
+int wait_time(double wait_time){
+    while (wait_time > 0){
+        wait_time--;
+        }
+    return 1;
+    }
     
\ No newline at end of file