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
29
CustomSystemClock::getNow
()
const
30
{
31
boost::chrono::nanoseconds
ns(Simulator::Now().GetNanoSeconds());
32
return
system_clock::time_point(ns);
33
}
34
35
std::string
36
CustomSystemClock::getSince
()
const
37
{
38
return
" since start of simulation"
;
39
}
40
41
system_clock::duration
42
CustomSystemClock::toWaitDuration
(
system_clock::duration
d)
const
43
{
44
BOOST_ASSERT_MSG(
false
,
"Must not be called"
);
45
return
time::microseconds
(1);
46
}
47
49
50
steady_clock::time_point
51
CustomSteadyClock::getNow
()
const
52
{
53
boost::chrono::nanoseconds
ns(Simulator::Now().GetNanoSeconds());
54
return
steady_clock::time_point(ns);
55
}
56
57
std::string
58
CustomSteadyClock::getSince
()
const
59
{
60
return
" since start of simulation"
;
61
}
62
63
steady_clock::duration
64
CustomSteadyClock::toWaitDuration
(
steady_clock::duration
d)
const
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
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::time::microseconds
boost::chrono::microseconds microseconds
Definition:
time.hpp:49
ns3::ndn::time::CustomSteadyClock::getNow
steady_clock::time_point getNow() const
Definition:
ndn-time.cpp:51
ns3::ndn::time::CustomSystemClock::getSince
std::string getSince() const
Definition:
ndn-time.cpp:36
ndn::time::duration
boost::chrono::duration< Rep, Period > duration
Definition:
time.hpp:34
ndn::time
Definition:
time-custom-clock.hpp:28
ns3
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-app-link-service.cpp:32
ns3::ndn::time::CustomSystemClock::getNow
system_clock::time_point getNow() const
Definition:
ndn-time.cpp:29
ns3::ndn::time::CustomSteadyClock::getSince
std::string getSince() const
Definition:
ndn-time.cpp:58
ndn-time.hpp
ndn::time::nanoseconds
boost::chrono::nanoseconds nanoseconds
Definition:
time.hpp:50
ns3::ndn::time::CustomSystemClock::toWaitDuration
system_clock::duration toWaitDuration(system_clock::duration d) const
Definition:
ndn-time.cpp:42
ns3::ndn::time::CustomSteadyClock::toWaitDuration
steady_clock::duration toWaitDuration(steady_clock::duration d) const
Definition:
ndn-time.cpp:64
ndnSIM
utils
ndn-time.cpp
Generated on Fri May 6 2022 12:34:15 for ndnSIM by
1.8.13