ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
CxxUtils
Root
clock.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// $Id$
12
13
#include "
CxxUtils/clock.h
"
14
15
#if defined (__APPLE__) && __clang_major__ < 12
16
#include <stdint.h>
17
#include <mach/mach_time.h>
18
19
long
clock_gettime (
unsigned
int
/*which_clock*/
,
struct
timespec *tp)
20
{
21
uint64_t
time
= 0;
22
mach_timebase_info_data_t
info
;
23
kern_return_t
err
= mach_timebase_info( &info );
24
25
//Convert the timebase into seconds
26
if
( err == 0 ) {
27
uint64_t
mach_time = mach_absolute_time( );
28
time
= mach_time *
info
.numer /
info
.denom;
29
}
30
tp->tv_sec =
time
* 1
e
-9;
31
tp->tv_nsec =
time
- (tp->tv_sec * 1e9);
32
return
0;
33
}
34
#endif
clock.h
Provide simplified clock_gettime() function for MacOSX.
AllowedVariables::e
e
Definition
AsgElectronSelectorTool.cxx:37
CaloSwCorrections.time
time(flags, cells_name, *args, **kw)
Definition
CaloSwCorrections.py:242
dqt_zlumi_pandas.err
err
Definition
dqt_zlumi_pandas.py:183
python.ParticleTypeUtil.info
info
Definition
ParticleTypeUtil.py:87
xAOD::uint64_t
uint64_t
Definition
EventInfo_v1.cxx:123
Generated on
for ATLAS Offline Software by
1.17.0