My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
TimeOut.h
Go to the documentation of this file.
1 // $Id: TimeOut.h,v 1.1.1.1 2009/07/06 23:57:27 eml Exp $
2 
3 #ifndef GCP_UTIL_TIMEOUT_H
4 #define GCP_UTIL_TIMEOUT_H
5 
15 #include "gcp/util/common/TimeVal.h"
16 
17 namespace gcp {
18  namespace util {
19 
20  class TimeOut {
21  public:
22 
23  // Default interval
24 
25  static const unsigned int defaultInterval_ = 5*60;
26 
27  // Public methods
28 
29  TimeOut();
30 
31  void setIntervalInSeconds(unsigned int seconds);
32 
33  void activate(bool active);
34 
35  void reset();
36 
37  struct timeval* tVal();
38 
39  TimeVal timeOut_; // The timeval managed by this class
40 
41  private:
42 
43  bool active_;
44  bool resetPending_;
45 
46  }; // End class TimeOut
47 
48  } // End namespace util
49 } // End namespace gcp
50 
51 
52 #endif // End #ifndef GCP_UTIL_TIMEOUT_H
void setIntervalInSeconds(unsigned int seconds)
Definition: TimeOut.cc:23
struct timeval * tVal()
Definition: TimeOut.cc:40
Definition: TimeOut.h:20
void activate(bool active)
Definition: TimeOut.cc:31
void reset()
Definition: TimeOut.cc:61
Definition: TimeVal.h:55