Motorcortex Core  version: 2.7.6
timer.h
1 /*
2  * Developer : Alexey Zakharov (alexey.zakharov@vectioneer.com)
3  * All rights reserved. Copyright (c) 2020 VECTIONEER.
4  */
5 
6 #ifndef MOTORCORTEX_LICENSE_TIMER_H
7 #define MOTORCORTEX_LICENSE_TIMER_H
8 
9 #include <atomic>
10 #include <thread>
11 
12 namespace mcx {
13 
14 namespace license {
15 
16 class Timer {
17 public:
18  bool start(std::time_t sec, int exit_code = 255);
19 
20 private:
21  std::thread timer_;
22  static std::atomic_flag flag_;
23 };
24 
25 } // namespace license
26 
27 } // namespace mcx
28 
29 #endif // MOTORCORTEX_LICENSE_TIMER_H
mcx::license::Timer
Definition: timer.h:16