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 class intervaltimerprivate;
10 
16 class RUDIMENTS_DLLSPEC intervaltimer {
17  public:
18 
29  intervaltimer(int32_t which);
30 
32  ~intervaltimer();
33 
36  void initialize();
37 
40  void setInitialInterval(int32_t seconds,
41  int32_t microseconds);
42 
45  void setPeriodicInterval(int32_t seconds,
46  int32_t microseconds);
47 
50  void setIntervals(int32_t seconds, int32_t microseconds);
51 
52 
55  void getInitialInterval(int32_t *seconds,
56  int32_t *microseconds) const;
57 
60  void getPeriodicInterval(int32_t *seconds,
61  int32_t *microseconds) const;
62 
67  bool start() const;
68 
75  bool start(int32_t *seconds, int32_t *microseconds) const;
76 
77 
80  bool getTimeRemaining(int32_t *seconds,
81  int32_t *microseconds) const;
82 
83 
86  bool stop();
87 
88  #include <rudiments/private/intervaltimer.h>
89 };
90 
91 #endif