Rudiments
|
00001 // Copyright (c) 2004 David Muse 00002 // See the COPYING file for more information. 00003 00004 #ifndef RUDIMENTS_INTERVALTIMER_H 00005 #define RUDIMENTS_INTERVALTIMER_H 00006 00007 #include <rudiments/private/intervaltimerincludes.h> 00008 00009 #ifdef RUDIMENTS_NAMESPACE 00010 namespace rudiments { 00011 #endif 00012 00013 class intervaltimerprivate; 00014 00020 class RUDIMENTS_DLLSPEC intervaltimer { 00021 public: 00022 00033 intervaltimer(int32_t which); 00034 00036 ~intervaltimer(); 00037 00040 void initialize(); 00041 00044 void setInitialInterval(long seconds, long microseconds); 00045 00048 void setPeriodicInterval(long seconds, long microseconds); 00049 00052 void setIntervals(long seconds, long microseconds); 00053 00054 00057 void getInitialInterval(long *seconds, 00058 long *microseconds) const; 00059 00062 void getPeriodicInterval(long *seconds, 00063 long *microseconds) const; 00064 00069 bool start() const; 00070 00077 bool start(long *seconds, long *microseconds) const; 00078 00079 00082 bool getTimeRemaining(long *seconds, 00083 long *microseconds) const; 00084 00085 00088 bool stop(); 00089 00090 #include <rudiments/private/intervaltimer.h> 00091 }; 00092 00093 #ifdef RUDIMENTS_NAMESPACE 00094 } 00095 #endif 00096 00097 #endif