00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef vuStopWatch_h__
00011 #define vuStopWatch_h__
00012
00013 #include <iostream.h>
00014
00029 class vuStopWatch
00030
00031 {
00032 public:
00033
00037 vuStopWatch (int time_in_ms = 0);
00038
00040 virtual ~vuStopWatch ();
00041
00042 public:
00043
00049 void Start (int time_in_ms = 0);
00050
00054 int Time ();
00055
00058 void Pause ();
00059
00062 void Resume ();
00063
00066 int TotalTime ();
00067
00068 public:
00069
00072 void setIsReversing (bool isit);
00073
00075 void setIsRewinding (bool isit);
00076
00079 void setIsFastForwarding (bool isit);
00080
00088 void setIsLooping (bool isit);
00089
00097 void setIsBouncing (bool isit);
00098
00099 public:
00100
00102 bool IsReversing ();
00103
00105 bool IsRewinding ();
00106
00108 bool IsFastForwarding ();
00109
00111 bool IsLooping ();
00112
00114 bool IsBouncing ();
00115
00116 public:
00117
00122 void setFastSpeed (float mul);
00123
00125 float getFastSpeed ();
00126
00130 void setMaxTime (int maxtime_in_ms);
00131
00134 int getMaxTime ();
00135
00136 private:
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148 void * m_timer_1;
00152 void * m_timer_2;
00155 void * m_timer_3;
00157 private:
00158
00159 bool mb_reversing;
00160
00161 bool mb_fastforwarding;
00162 bool mb_rewinding;
00163
00164 bool mb_looping;
00165 bool mb_bouncing;
00166
00167 private:
00168
00169 int m_maxtime;
00170 float m_fastspeed;
00172 };
00173
00174 #endif
00175
00176
00177