distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
wasteTime.hpp
Go to the documentation of this file.
1 
12 #ifndef TEST_WASTETIME_HPP_
13 #define TEST_WASTETIME_HPP_
14 
15 #include "distortos/TickClock.hpp"
16 
17 namespace distortos
18 {
19 
20 namespace test
21 {
22 
31 void wasteTime(TickClock::duration duration);
32 
44 template<typename Rep, typename Period>
45 void wasteTime(const std::chrono::duration<Rep, Period> duration)
46 {
47  wasteTime(std::chrono::duration_cast<TickClock::duration>(duration));
48 }
49 
56 void wasteTime(TickClock::time_point timePoint);
57 
66 template<typename Duration>
67 void wasteTime(const std::chrono::time_point<TickClock, Duration> timePoint)
68 {
69  wasteTime(std::chrono::time_point_cast<TickClock::duration>(timePoint));
70 }
71 
72 } // namespace test
73 
74 } // namespace distortos
75 
76 #endif // TEST_WASTETIME_HPP_
std::chrono::time_point< TickClock > time_point
basic time_point type of clock
Definition: TickClock.hpp:42
TickClock class header.
Top-level namespace of distortos project.
std::chrono::duration< rep, period > duration
basic duration type of clock
Definition: TickClock.hpp:39
void wasteTime(const TickClock::duration duration)
Wastes time.
Definition: wasteTime.cpp:24