Skip to content

Commit 245fee1

Browse files
matthiasrichterktf
authored andcommitted
cleanup: removing conditional usage of chrono library
1 parent 2517c81 commit 245fee1

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

Utilities/aliceHLTwrapper/src/WrapperDevice.cxx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,8 @@ using std::vector;
3333
using std::unique_ptr;
3434
using namespace ALICE::HLT;
3535

36-
// the chrono lib needs C++11
37-
#if __cplusplus < 201103L
38-
#warning statistics measurement for WrapperDevice disabled: need C++11 standard
39-
#else
40-
#define USE_CHRONO
41-
#endif
42-
#ifdef USE_CHRONO
43-
#include <chrono>
4436
using std::chrono::system_clock;
4537
using TimeScale = std::chrono::milliseconds;
46-
#endif // USE_CHRONO
4738

4839
WrapperDevice::WrapperDevice(int argc, char** argv, int verbosity)
4940
: mComponent(nullptr)
@@ -108,9 +99,7 @@ void WrapperDevice::Run()
10899
/// inherited from FairMQDevice
109100
int iResult=0;
110101

111-
#ifdef USE_CHRONO
112102
static system_clock::time_point refTime = system_clock::now();
113-
#endif // USE_CHRONO
114103

115104
unique_ptr<FairMQPoller> poller(fTransportFactory->CreatePoller(fChannels["data-in"]));
116105

@@ -162,7 +151,7 @@ void WrapperDevice::Run()
162151
// LOG(INFO) << "------ recieved complete Msg from " << numInputs << " input(s) after " << nReadCycles << " read cycles" ;
163152
// }
164153
nReadCycles=0;
165-
#ifdef USE_CHRONO
154+
166155
auto duration = std::chrono::duration_cast<TimeScale>(std::chrono::system_clock::now() - refTime);
167156

168157
if (mLastSampleTime>=0) {
@@ -189,7 +178,6 @@ void WrapperDevice::Run()
189178
mMaxReadCycles=-1;
190179
mLastCalcTime=duration.count();
191180
}
192-
#endif //USE_CHRONO
193181

194182
if (!mSkipProcessing) {
195183
// prepare input from messages

0 commit comments

Comments
 (0)