NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
ndn-time.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20 #ifndef NDNSIM_UTILS_TIME_HPP
21 #define NDNSIM_UTILS_TIME_HPP
22 
23 #include "ns3/ndnSIM/model/ndn-common.hpp"
24 
25 #include <ndn-cxx/util/time-custom-clock.hpp>
26 
27 namespace ns3 {
28 namespace ndn {
29 namespace time {
30 
31 class CustomSystemClock : public CustomClock<system_clock> {
32 public:
33  system_clock::time_point
34  getNow() const;
35 
36  std::string
37  getSince() const;
38 
39  boost::posix_time::time_duration
40  toPosixDuration(const system_clock::duration& duration) const;
41 };
42 
43 class CustomSteadyClock : public CustomClock<steady_clock> {
44 public:
45  steady_clock::time_point
46  getNow() const;
47 
48  std::string
49  getSince() const;
50 
51  boost::posix_time::time_duration
52  toPosixDuration(const steady_clock::duration& duration) const;
53 };
54 
55 } // namespace time
56 } // namespace ndn
57 } // namespace ns3
58 
59 #endif // NDNSIM_UTILS_TIME_HPP
Copyright (c) 2011-2015 Regents of the University of California.
std::string getSince() const
Definition: ndn-time.cpp:36
boost::posix_time::time_duration toPosixDuration(const system_clock::duration &duration) const
Definition: ndn-time.cpp:42
system_clock::time_point getNow() const
Definition: ndn-time.cpp:29
Copyright (c) 2011-2015 Regents of the University of California.