00001
00002
00003
00004
00005
00006
00007 #ifndef CLOCK_H_
00008 #define CLOCK_H_
00009
00010 extern "C"
00011 {
00012 #include "ecrobot_interface.h"
00013 #include "rtoscalls.h"
00014 };
00015
00016 namespace ecrobot
00017 {
00056 class Clock
00057 {
00058 public:
00065 Clock(void);
00066
00072 void reset(void);
00073
00079 U32 now(void) const;
00080
00086 void wait(U32 duration);
00087
00093 void sleep(U32 duration);
00094
00095 private:
00096 U32 mStartClock;
00097 };
00098 }
00099
00100 #endif