RCFProto

- Main Page
- Classes
- Files

- File List

All Classes Functions Typedefs
Timer.hpp
1
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2013, Delta V Software. All rights reserved.
6 // http://www.deltavsoft.com
7 //
8 // RCF is distributed under dual licenses - closed source or GPL.
9 // Consult your particular license for conditions of use.
10 //
11 // If you have not purchased a commercial license, you are using RCF
12 // under GPL terms.
13 //
14 // Version: 2.0
15 // Contact: support <at> deltavsoft.com
16 //
17 //******************************************************************************
18
19 #ifndef INCLUDE_RCF_TIMER_HPP
20 #define INCLUDE_RCF_TIMER_HPP
21
22 #include <RCF/Export.hpp>
23
24 #include <boost/cstdint.hpp>
25
26 namespace RCF {
27
28 class RCF_EXPORT Timer
29 {
30 public:
31
32 Timer();
33 Timer(boost::uint32_t startTimeMs);
34
35 bool elapsed(boost::uint32_t durationMs);
36 void restart();
37 void restart(boost::uint32_t startTimeMs);
38 boost::uint32_t getStartTimeMs();
39 boost::uint32_t getDurationMs();
40
41 private:
42 boost::uint32_t mStartTimeMs;
43 };
44
45 }
46
47 #endif // ! INCLUDE_RCF_TIMER_HPP