Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
blob
main
examples
external_packages
clvisc_wrapper
googletest
gtl
hydro_from_external_file
arsenal.cpp
arsenal.h
cornelius.cpp
cornelius.h
fluidCell.h
FluidcellStatistic.cpp
FluidcellStatistic.h
Hydroinfo_h5.cpp
Hydroinfo_h5.h
Hydroinfo_MUSIC.cpp
Hydroinfo_MUSIC.h
main.cpp
ParameterReader.cpp
ParameterReader.h
Stopwatch.h
SurfaceFinder.cpp
SurfaceFinder.h
trento
cornelius.cpp
cornelius.h
fjcore.cc
fjcore.hh
gzstream.cc
gzstream.h
sigslot.h
tinyxml2.cc
tinyxml2.h
jail
src
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Stopwatch.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Stopwatch.h
1
#ifndef Stopwatch_header
2
#define Stopwatch_header
3
4
#include <ctime>
5
6
class
Stopwatch
7
{
8
private
:
9
time_t
start
,
end
;
10
public
:
11
Stopwatch
() {
start
=clock();
end
=0;}
12
void
tic
() {
start
=clock();}
13
void
toc
() {
end
=clock();}
14
double
takeTime
() {
return
((
double
)(
end
-
start
)) / CLOCKS_PER_SEC;}
15
};
16
17
#endif
18
19
/*-----------------------------------------------------------------------
20
Usage:
21
Declare a class as:
22
Stopwatch sw;
23
Then the time a piece of code takes can be recorded as:
24
sw.tic();
25
**** code ****
26
sw.toc();
27
And the result can be outputted using:
28
cout << sw.takeTime() << endl;
29
-----------------------------------------------------------------------*/
JETSCAPE
blob
main
external_packages
hydro_from_external_file
Stopwatch.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:24
using
1.8.2 with
sPHENIX GitHub integration