NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn-time.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20 #include "ndn-time.hpp"
21 
22 #include "ns3/simulator.h"
23 
24 namespace ns3 {
25 namespace ndn {
26 namespace time {
27 
28 system_clock::time_point
30 {
31  boost::chrono::nanoseconds ns(Simulator::Now().GetNanoSeconds());
32  return system_clock::time_point(ns);
33 }
34 
35 std::string
37 {
38  return " since start of simulation";
39 }
40 
43 {
44  BOOST_ASSERT_MSG(false, "Must not be called");
45  return time::microseconds(1);
46 }
47 
49 
50 steady_clock::time_point
52 {
53  boost::chrono::nanoseconds ns(Simulator::Now().GetNanoSeconds());
54  return steady_clock::time_point(ns);
55 }
56 
57 std::string
59 {
60  return " since start of simulation";
61 }
62 
65 {
66  BOOST_ASSERT_MSG(false, "Must not be called");
67  return time::microseconds(1);
68 }
69 
70 } // namespace time
71 } // namespace ndn
72 } // namespace ns3
Copyright (c) 2011-2015 Regents of the University of California.
boost::chrono::microseconds microseconds
Definition: time.hpp:49
steady_clock::time_point getNow() const
Definition: ndn-time.cpp:51
std::string getSince() const
Definition: ndn-time.cpp:36
boost::chrono::duration< Rep, Period > duration
Definition: time.hpp:34
Copyright (c) 2011-2015 Regents of the University of California.
system_clock::time_point getNow() const
Definition: ndn-time.cpp:29
std::string getSince() const
Definition: ndn-time.cpp:58
boost::chrono::nanoseconds nanoseconds
Definition: time.hpp:50
system_clock::duration toWaitDuration(system_clock::duration d) const
Definition: ndn-time.cpp:42
steady_clock::duration toWaitDuration(steady_clock::duration d) const
Definition: ndn-time.cpp:64