11 #include <boost/chrono/ceil.hpp>
15 template <
class Rep,
class Period>
16 void sleepFor(
const boost::chrono::duration<Rep, Period>& d)
18 sleepFor(boost::chrono::ceil<SteadyClock::duration>(d));
21 template <
class Duration>
22 void sleepUntil(
const boost::chrono::time_point<SteadyClock, Duration>& t)
27 template <
class Duration>
28 void sleepUntil(
const boost::chrono::time_point<WallClock, Duration>& t)
39 template <
class CharT>
40 struct clock_string<qi::SteadyClock, CharT>
42 static std::basic_string<CharT>
name() {
return "qi::steady_clock";}
43 static std::basic_string<CharT>
since() {
44 return clock_string<boost::chrono::steady_clock, CharT>::since();
48 template <
class CharT>
49 struct clock_string<qi::WallClock, CharT>
51 static std::basic_string<CharT>
name() {
return "qi::system_clock";}
52 static std::basic_string<CharT>
since() {
53 return clock_string<boost::chrono::system_clock, CharT>::since();
59 #endif // _QI_CLOCK_HXX_
static std::basic_string< CharT > name()
static std::basic_string< CharT > since()
void sleepUntil(const SteadyClockTimePoint &t)
static std::basic_string< CharT > name()
void sleepFor(const qi::Duration &d)
static std::basic_string< CharT > since()
static WallClockTimePoint now()
static SteadyClockTimePoint now()