ATLAS Offline Software
Trigger
TrigTools
TrigTimeAlgs
src
TrigTimeStamp.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigTimeAlgs/TrigTimeStamp.h
"
6
7
double
TrigTimeStamp::millisecondsSince
()
const
{
8
return
std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::high_resolution_clock::now
() -
m_stamp
).count();
9
}
10
11
double
TrigTimeStamp::millisecondsDifference
(
const
TrigTimeStamp
&
other
)
const
{
12
return
std::chrono::duration_cast<std::chrono::milliseconds>(
other
.get() -
m_stamp
).count();
13
}
14
15
uint64_t
TrigTimeStamp::microsecondsSinceEpoch
()
const
{
16
// Note: A uint64_t at microsecond precision has capacity of ~585,000 years
17
uint64_t
microsecondsSinceEpoch
= std::chrono::duration_cast<std::chrono::microseconds>(
m_stamp
.time_since_epoch() ).count();
18
return
microsecondsSinceEpoch
;
19
}
TrigTimeStamp::millisecondsDifference
double millisecondsDifference(const TrigTimeStamp &other) const
Definition:
TrigTimeStamp.cxx:11
TrigTimeStamp::m_stamp
stamp_type m_stamp
Definition:
TrigTimeStamp.h:70
TrigTimeStamp::millisecondsSince
double millisecondsSince() const
Definition:
TrigTimeStamp.cxx:7
python.handimod.now
now
Definition:
handimod.py:675
TrigTimeStamp
utility class to measure time duration in AthenaMT The pattern when it is useful: AlgA tags the begin...
Definition:
TrigTimeStamp.h:23
xAOD::uint64_t
uint64_t
Definition:
EventInfo_v1.cxx:123
TrigTimeStamp::microsecondsSinceEpoch
uint64_t microsecondsSinceEpoch() const
Definition:
TrigTimeStamp.cxx:15
InDetDD::other
@ other
Definition:
InDetDD_Defs.h:16
TrigTimeStamp.h
Generated on Sun Dec 22 2024 21:21:24 for ATLAS Offline Software by
1.8.18