ATLAS Offline Software
TrigTimeStamp.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TrigTimeAlgs_TrigTimeStamp_h
6 #define TrigTimeAlgs_TrigTimeStamp_h
7 
8 #include <chrono>
24 public:
25  typedef std::chrono::high_resolution_clock::time_point stamp_type;
26 
30  TrigTimeStamp();
31 
35  TrigTimeStamp& operator=(const TrigTimeStamp&) = default;
36 
40  TrigTimeStamp(const TrigTimeStamp&) = default;
41 
45  double millisecondsSince() const;
46 
51  double millisecondsDifference(const TrigTimeStamp& other) const;
52 
57 
61  stamp_type get() const;
62 
68 
69 private:
71 
72 };
73 
74 CLASS_DEF( TrigTimeStamp , 262409323 , 1 )
75 
77 
79 
81 
82 #endif // TrigTimeAlgs_TrigTimeStamp_h
TrigTimeStamp::millisecondsDifference
double millisecondsDifference(const TrigTimeStamp &other) const
Definition: TrigTimeStamp.cxx:11
TrigTimeStamp::m_stamp
stamp_type m_stamp
Definition: TrigTimeStamp.h:70
TrigTimeStamp::get
stamp_type get() const
Obtain the stamp value.
Definition: TrigTimeStamp.h:78
TrigTimeStamp::millisecondsSince
double millisecondsSince() const
Definition: TrigTimeStamp.cxx:7
TrigTimeStamp::TrigTimeStamp
TrigTimeStamp()
Default constructor, sets to now.
Definition: TrigTimeStamp.h:76
python.handimod.now
now
Definition: handimod.py:675
TrigTimeStamp::stamp_type
std::chrono::high_resolution_clock::time_point stamp_type
Definition: TrigTimeStamp.h:25
TrigTimeStamp
utility class to measure time duration in AthenaMT The pattern when it is useful: AlgA tags the begin...
Definition: TrigTimeStamp.h:23
TrigTimeStamp::set
void set(stamp_type time=std::chrono::high_resolution_clock::now())
Update the stamp value.
Definition: TrigTimeStamp.h:80
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:224
TrigTimeStamp::microsecondsSinceEpoch
uint64_t microsecondsSinceEpoch() const
Definition: TrigTimeStamp.cxx:15
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
TrigTimeStamp::TrigTimeStamp
TrigTimeStamp(const TrigTimeStamp &)=default
Automatic copy constructor.
TrigTimeStamp::operator=
TrigTimeStamp & operator=(const TrigTimeStamp &)=default
Automatic copy assignemnt operator.
CLASS_DEF.h
macros to associate a CLID to a type