File: protocoltimerasio.h

package info (click to toggle)
sinfo 0.0.48-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 3,332 kB
  • sloc: sh: 11,213; cpp: 6,722; makefile: 271; xml: 151; perl: 149
file content (31 lines) | stat: -rw-r--r-- 645 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef _protocoltimerasio_h
#define _protocoltimerasio_h


#include "protocoltimer.h"
#include <boost/asio.hpp>


/**
* @brief asio variant of the ProtocolIO base class
*
* Keeps the reference to boost::asio::ioservice in order
* to allow making use of the  asio timers.
*
* This class has to be used in order to make a program use
* the operating system / asio clock.
*/
class ProtocolIOAsio : public ProtocolIO
{
private:
  boost::asio::io_service & ioservice;

public:
  ProtocolIOAsio(boost::asio::io_service & ioservice);

  boost::posix_time::ptime currentTimeUTC();
  TheTimerObjectBase * getTimer();
};


#endif // _protocoltimerasio_h