CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Static Private Member Functions
edm::TimeOfDay Struct Reference

#include <TimeOfDay.h>

Public Member Functions

 TimeOfDay ()
 
 TimeOfDay (struct timeval const &tv)
 
 TimeOfDay (std::chrono::system_clock::time_point const &tp)
 

Public Attributes

struct timeval tv_
 

Static Private Member Functions

static struct timeval setTime_ ()
 

Detailed Description

Definition at line 9 of file TimeOfDay.h.

Constructor & Destructor Documentation

◆ TimeOfDay() [1/3]

edm::TimeOfDay::TimeOfDay ( )

Definition at line 14 of file TimeOfDay.cc.

static struct timeval setTime_()
Definition: TimeOfDay.cc:24
struct timeval tv_
Definition: TimeOfDay.h:14

◆ TimeOfDay() [2/3]

edm::TimeOfDay::TimeOfDay ( struct timeval const &  tv)
explicit

Definition at line 16 of file TimeOfDay.cc.

16 : tv_(tv) {}
struct timeval tv_
Definition: TimeOfDay.h:14

◆ TimeOfDay() [3/3]

edm::TimeOfDay::TimeOfDay ( std::chrono::system_clock::time_point const &  tp)
explicit

Definition at line 18 of file TimeOfDay.cc.

References submitPVResolutionJobs::count, cmsswSequenceInfo::tp, and tv_.

18  {
19  auto us = std::chrono::duration_cast<std::chrono::microseconds>(tp.time_since_epoch()).count();
20  tv_.tv_sec = us / 1000000;
21  tv_.tv_usec = us % 1000000;
22  }
struct timeval tv_
Definition: TimeOfDay.h:14

Member Function Documentation

◆ setTime_()

timeval edm::TimeOfDay::setTime_ ( )
staticprivate

Definition at line 24 of file TimeOfDay.cc.

24  {
25  timeval tv;
26  gettimeofday(&tv, nullptr);
27  return tv;
28  }

Member Data Documentation

◆ tv_

struct timeval edm::TimeOfDay::tv_

Definition at line 14 of file TimeOfDay.h.

Referenced by edm::operator<<(), and TimeOfDay().