A Discrete-Event Network Simulator
QKDNetSim v2.0 (NS-3 v3.41) @ (+)
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
Enumerator
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
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
v
w
x
y
z
Typedefs
Enumerations
Enumerator
c
e
i
l
o
r
s
t
v
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
system-wall-clock-timestamp.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2020 Lawrence Livermore National Laboratory
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Peter D. Barnes, Jr. <pdbarnes@llnl.gov>
18
*/
19
20
#ifndef SYSTEM_WALL_CLOCK_TIMESTAMP_H
21
#define SYSTEM_WALL_CLOCK_TIMESTAMP_H
22
29
#include <ctime>
// ctime, time_t
30
#include <string>
31
32
namespace
ns3
33
{
34
38
class
SystemWallClockTimestamp
39
{
40
public
:
42
SystemWallClockTimestamp
();
43
45
void
Stamp
();
46
51
std::string
ToString
()
const
;
52
57
std::time_t
GetLast
()
const
;
58
63
std::time_t
GetInterval
()
const
;
64
65
private
:
67
std::time_t
m_last
;
68
70
std::time_t
m_diff
;
71
72
};
// class SystemWallClockTimestamp
73
74
}
// namespace ns3
75
76
#endif
/* SYSTEM_WALL_CLOCK_TIMESTAMP_H */
ns3::SystemWallClockTimestamp
Utility class to record the difference between two wall-clock times.
Definition:
system-wall-clock-timestamp.h:39
ns3::SystemWallClockTimestamp::GetInterval
std::time_t GetInterval() const
Get the last recorded interval.
Definition:
system-wall-clock-timestamp.cc:61
ns3::SystemWallClockTimestamp::GetLast
std::time_t GetLast() const
Get the last recorded raw value.
Definition:
system-wall-clock-timestamp.cc:55
ns3::SystemWallClockTimestamp::ToString
std::string ToString() const
Get the last time stamp as a string.
Definition:
system-wall-clock-timestamp.cc:47
ns3::SystemWallClockTimestamp::SystemWallClockTimestamp
SystemWallClockTimestamp()
Constructor.
Definition:
system-wall-clock-timestamp.cc:31
ns3::SystemWallClockTimestamp::m_diff
std::time_t m_diff
Difference between the two previous time stamps.
Definition:
system-wall-clock-timestamp.h:70
ns3::SystemWallClockTimestamp::Stamp
void Stamp()
Record the current wall-clock time and delta since the last stamp().
Definition:
system-wall-clock-timestamp.cc:39
ns3::SystemWallClockTimestamp::m_last
std::time_t m_last
The last time stamp.
Definition:
system-wall-clock-timestamp.h:67
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
core
model
system-wall-clock-timestamp.h
Generated on Sun Mar 3 2024 17:10:55 for ns-3 by
1.9.1