ATLAS Offline Software
Loading...
Searching...
No Matches
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>
24public:
25 typedef std::chrono::high_resolution_clock::time_point stamp_type;
26
31
36
40 TrigTimeStamp(const TrigTimeStamp&) = default;
41
45 double millisecondsSince() const;
46
51 double millisecondsDifference(const TrigTimeStamp& other) const;
52
56 uint64_t microsecondsSinceEpoch() const;
57
61 stamp_type get() const;
62
67 void set(stamp_type time = std::chrono::high_resolution_clock::now());
68
69private:
71
72};
73
74CLASS_DEF( TrigTimeStamp , 262409323 , 1 )
75
77
79
81
82#endif // TrigTimeAlgs_TrigTimeStamp_h
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
utility class to measure time duration in AthenaMT The pattern when it is useful: AlgA tags the begin...
stamp_type get() const
Obtain the stamp value.
double millisecondsSince() const
TrigTimeStamp()
Default constructor, sets to now.
double millisecondsDifference(const TrigTimeStamp &other) const
std::chrono::high_resolution_clock::time_point stamp_type
TrigTimeStamp(const TrigTimeStamp &)=default
Automatic copy constructor.
uint64_t microsecondsSinceEpoch() const
TrigTimeStamp & operator=(const TrigTimeStamp &)=default
Automatic copy assignemnt operator.
stamp_type m_stamp
void set(stamp_type time=std::chrono::high_resolution_clock::now())
Update the stamp value.