Rudiments
intervaltimer.h
1 // Copyright (c) 2004 David Muse
2 // See the COPYING file for more information.
3 
4 #ifndef RUDIMENTS_INTERVALTIMER_H
5 #define RUDIMENTS_INTERVALTIMER_H
6 
7 #include <rudiments/private/intervaltimerincludes.h>
8 
9 #ifdef RUDIMENTS_NAMESPACE
10 namespace rudiments {
11 #endif
12 
13 class intervaltimerprivate;
14 
20 class RUDIMENTS_DLLSPEC intervaltimer {
21  public:
22 
33  intervaltimer(int32_t which);
34 
36  ~intervaltimer();
37 
40  void initialize();
41 
44  void setInitialInterval(long seconds, long microseconds);
45 
48  void setPeriodicInterval(long seconds, long microseconds);
49 
52  void setIntervals(long seconds, long microseconds);
53 
54 
57  void getInitialInterval(long *seconds,
58  long *microseconds) const;
59 
62  void getPeriodicInterval(long *seconds,
63  long *microseconds) const;
64 
69  bool start() const;
70 
77  bool start(long *seconds, long *microseconds) const;
78 
79 
82  bool getTimeRemaining(long *seconds,
83  long *microseconds) const;
84 
85 
88  bool stop();
89 
90  #include <rudiments/private/intervaltimer.h>
91 };
92 
93 #ifdef RUDIMENTS_NAMESPACE
94 }
95 #endif
96 
97 #endif