CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TimingServiceBase.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Subsystem/Package
4 // Class : TimingServiceBase
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author: Chris Jones
10 // Created: Wed, 11 Jun 2014 15:08:00 GMT
11 //
12 
13 // system include files
14 #include <sys/resource.h>
15 #include <sys/time.h>
16 
17 // user include files
19 
20 using namespace edm;
21 //
22 // constants, enums and typedefs
23 //
25 
27  if (0.0 == s_jobStartTime) {
28  struct timeval t;
29  if (gettimeofday(&t, nullptr) < 0) {
30  return;
31  }
32  s_jobStartTime = static_cast<double>(t.tv_sec) + (static_cast<double>(t.tv_usec) * 1E-6);
33  }
34 }
35 
36 //
37 // constructors and destructor
38 //
40 
static double s_jobStartTime