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
Namespace List
+
Namespace Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
+
Typedefs
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
Enumerations
+
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
u
v
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
+
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
+
Enumerator
a
d
e
f
i
k
l
n
p
r
s
u
w
+
Related Functions
b
c
d
e
f
g
i
k
l
m
n
o
p
s
v
+
Files
File List
+
File Members
+
All
a
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
u
v
w
+
Functions
c
f
h
m
r
s
u
w
+
Variables
a
c
d
g
k
l
n
p
r
s
Typedefs
+
Macros
b
d
e
f
i
l
m
n
p
r
s
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
time-custom-clock.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_TIME_CUSTOM_CLOCK_HPP
23
#define NDN_TIME_CUSTOM_CLOCK_HPP
24
25
#include "
time.hpp
"
26
27
namespace
ndn
{
28
namespace
time
{
29
36
template
<
typename
BaseClock>
37
class
CustomClock
38
{
39
public
:
40
virtual
41
~CustomClock
() =
default
;
42
43
virtual
typename
BaseClock::time_point
44
getNow
()
const
= 0;
45
46
virtual
std::string
47
getSince
()
const
= 0;
48
49
virtual
boost::posix_time::time_duration
50
toPosixDuration
(
const
typename
BaseClock::duration& duration)
const
= 0;
51
};
52
53
typedef
CustomClock<system_clock>
CustomSystemClock
;
54
typedef
CustomClock<steady_clock>
CustomSteadyClock
;
55
62
void
63
setCustomClocks
(shared_ptr<CustomSteadyClock> steadyClock =
nullptr
,
64
shared_ptr<CustomSystemClock> systemClock =
nullptr
);
65
66
}
// namespace time
67
}
// namespace ndn
68
69
#endif // NDN_TIME_CUSTOM_CLOCK_HPP
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::time::CustomClock::getNow
virtual BaseClock::time_point getNow() const =0
ndn::time::CustomSteadyClock
CustomClock< steady_clock > CustomSteadyClock
Definition:
time-custom-clock.hpp:54
ndn::time::CustomClock::getSince
virtual std::string getSince() const =0
ndn::time::CustomClock
Class implementing custom system or steady clock behavior.
Definition:
time-custom-clock.hpp:37
ndn::time
Definition:
time-custom-clock.hpp:28
ndn::time::CustomSystemClock
CustomClock< system_clock > CustomSystemClock
Definition:
time-custom-clock.hpp:53
time.hpp
ndn::time::CustomClock::toPosixDuration
virtual boost::posix_time::time_duration toPosixDuration(const typename BaseClock::duration &duration) const =0
ndn::time::setCustomClocks
void setCustomClocks(shared_ptr< CustomSteadyClock > steadyClock=nullptr, shared_ptr< CustomSystemClock > systemClock=nullptr)
Set custom system and steady clocks.
Definition:
time.cpp:35
ndn::time::CustomClock::~CustomClock
virtual ~CustomClock()=default
ndnSIM
ndn-cxx
src
util
time-custom-clock.hpp
Generated on Wed Jan 11 2017 18:17:15 for ndnSIM by
1.8.13