Rcpp Version 1.0.14
Toggle main menu visibility
Main Page
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
y
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Variables
_
b
c
d
f
g
k
m
n
r
t
y
Typedefs
c
d
e
f
g
i
l
n
p
r
s
t
v
w
Classes
Class List
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
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
_
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
Enumerator
r
v
Related Symbols
o
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
x
y
Functions
a
c
d
e
f
g
i
l
m
o
p
r
s
Variables
Typedefs
Macros
_
a
b
c
d
e
g
h
i
j
l
m
n
o
r
s
t
u
v
y
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerator
Friends
Macros
Loading...
Searching...
No Matches
Timertest.cpp
Go to the documentation of this file.
1
// -*- mode: c++; compile-command: "g++ -Wall -O3 -o Timertest Timertest.cpp"; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
2
3
// from http://www.cs.uiowa.edu/~sriram/30/fall03/
4
5
#include <iostream>
6
#include <unistd.h>
7
#include "
Timer.h
"
8
9
int
main
() {
10
Timer
test;
11
12
std::cout <<
"Sleeping 2 seconds"
<< std::endl;
13
test.
Start
();
14
sleep(2);
15
test.
Stop
();
16
std::cout <<
"Sleep lasted for "
<< test.
ElapsedTime
() <<
" seconds."
<< std::endl;
17
std::cout <<
"Sleeping 1 second"
<< std::endl;
18
test.
Start
();
19
sleep(1);
20
test.
Stop
();
21
std::cout <<
"Sleep lasted for "
<< test.
ElapsedTime
() <<
" seconds."
<< std::endl;
22
std::cout <<
"Cumulative time is "
<< test.
CumulativeTime
() <<
" seconds."
<< std::endl;
23
std::cout <<
"Reseting"
<< std::endl;
24
test.
Reset
();
25
std::cout <<
"Sleeping 2 seconds"
<< std::endl;
26
test.
Start
();
27
sleep(2);
28
test.
Stop
();
29
std::cout <<
"Sleep lasted for "
<< test.
ElapsedTime
() <<
" seconds."
<< std::endl;
30
std::cout <<
"Cumulative time is "
<< test.
CumulativeTime
() <<
" seconds."
<< std::endl;
31
}
9
int
main
() {
…
}
main
int main()
Definition
Timertest.cpp:9
Timer
Definition
Timer.h:31
Timer::ElapsedTime
double ElapsedTime()
Definition
Timer.h:41
Timer::Start
void Start()
Definition
Timer.h:34
Timer::Stop
void Stop()
Definition
Timer.h:35
Timer::CumulativeTime
double CumulativeTime()
Definition
Timer.h:42
Timer::Reset
void Reset()
Definition
Timer.h:40
Timer.h
inst
examples
SugarPerformance
Timertest.cpp
Generated on Sun Jan 12 2025 11:21:42 for Rcpp Version 1.0.14 by
1.9.8