NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
boost::posix_time::time_duration
42
CustomSystemClock::toPosixDuration
(
const
system_clock::duration& duration)
const
43
{
44
BOOST_ASSERT_MSG(
false
,
"Must not be called"
);
45
return
boost::posix_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
boost::posix_time::time_duration
64
CustomSteadyClock::toPosixDuration
(
const
steady_clock::duration& duration)
const
65
{
66
BOOST_ASSERT_MSG(
false
,
"Must not be called"
);
67
return
boost::posix_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
ns3::ndn::time::CustomSystemClock::getSince
std::string getSince() const
Definition:
ndn-time.cpp:36
ns3::ndn::time::CustomSystemClock::toPosixDuration
boost::posix_time::time_duration toPosixDuration(const system_clock::duration &duration) const
Definition:
ndn-time.cpp:42
ns3::ndn::time::CustomSystemClock::getNow
system_clock::time_point getNow() const
Definition:
ndn-time.cpp:29
ndn::time
Definition:
time-custom-clock.hpp:28
ns3::ndn::time::CustomSteadyClock::getNow
steady_clock::time_point getNow() const
Definition:
ndn-time.cpp:51
ns3
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
content-store-impl.cpp:38
ns3::ndn::time::CustomSteadyClock::toPosixDuration
boost::posix_time::time_duration toPosixDuration(const steady_clock::duration &duration) const
Definition:
ndn-time.cpp:64
ns3::ndn::time::CustomSteadyClock::getSince
std::string getSince() const
Definition:
ndn-time.cpp:58
ndn-time.hpp
ndnSIM
utils
ndn-time.cpp
Generated on Thu Nov 2 2017 03:30:30 for ndnSIM by
1.8.11