libqi-api  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
eventloop.hxx
Go to the documentation of this file.
1 #pragma once
2 /*
3 ** Copyright (C) 2013 Aldebaran Robotics
4 ** See COPYING for the license
5 */
6 
7 #ifndef _QI_DETAIL_EVENTLOOP_HXX_
8 #define _QI_DETAIL_EVENTLOOP_HXX_
9 
10 #include <qi/detail/future_fwd.hpp>
11 
12 namespace qi
13 {
14 template <typename R>
15 void nullConverter(void*, R&)
16 {}
17 
18 template <typename R>
19 Future<R> EventLoop::async(const boost::function<R()>& callback,
20  uint64_t usDelay)
21 {
22  return async(callback, qi::MicroSeconds(usDelay));
23 }
24 } // qi
25 
26 #endif
DurationType< int64_t, boost::micro > MicroSeconds
Definition: clock.hpp:26
Future< R > async(const boost::function< R()> &callback, uint64_t usDelay)
Calls given function once after given delay in microseconds.
Definition: eventloop.hxx:19
void nullConverter(void *, R &)
Definition: eventloop.hxx:15
uint64_t uint64_t
Definition: types.hpp:66