1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| #ifndef SLEEPER_BWPGKQCV
| #define SLEEPER_BWPGKQCV
|
| #include "fib.h"
| #include <chrono>
| #include <thread>
|
| class FibUSleeper : private FibSeq
| {
| public:
| FibUSleeper(int_type limit) :
| FibSeq(limit) {}
| void Sleep() { std::this_thread::sleep_for(std::chrono::microseconds(Inc())); }
| using FibSeq::Cur;
| using FibSeq::Limit;
| using FibSeq::Reset;
| using FibSeq::ResetLimit;
|
| protected:
| using FibSeq::Inc;
| };
|
| #endif // end of include guard: SLEEPER_BWPGKQCV
|
|