src
DataFormats
Scalers
interface
TimeSpec.h
Go to the documentation of this file.
1
2
#ifndef DataFormats_Scalers_TimeSpec_h
3
#define DataFormats_Scalers_TimeSpec_h
4
5
#include <ctime>
6
7
class
TimeSpec
{
8
public
:
9
TimeSpec
() :
tv_sec_
(0),
tv_nsec_
(0) {}
10
11
TimeSpec
(
long
tv_sec
,
long
tv_nsec
) :
tv_sec_
(
tv_sec
),
tv_nsec_
(
tv_nsec
) {}
12
13
TimeSpec
(timespec
const
& ts) :
tv_sec_
(static_cast<long>(ts.
tv_sec
)),
tv_nsec_
(static_cast<long>(ts.
tv_nsec
)) {}
14
15
long
tv_sec
()
const
{
return
tv_sec_
; }
16
long
tv_nsec
()
const
{
return
tv_nsec_
; }
17
18
void
set_tv_sec
(
long
value
) {
tv_sec_
=
value
; }
19
void
set_tv_nsec
(
long
value
) {
tv_nsec_
=
value
; }
20
21
timespec
get_timespec
()
const
;
22
23
private
:
24
long
tv_sec_
;
// seconds
25
long
tv_nsec_
;
// nanoseconds
26
};
27
28
#endif
TimeSpec::set_tv_nsec
void set_tv_nsec(long value)
Definition:
TimeSpec.h:19
TimeSpec::tv_sec
long tv_sec() const
Definition:
TimeSpec.h:15
TimeSpec
Definition:
TimeSpec.h:7
TimeSpec::tv_sec_
long tv_sec_
Definition:
TimeSpec.h:24
TimeSpec::TimeSpec
TimeSpec(long tv_sec, long tv_nsec)
Definition:
TimeSpec.h:11
TimeSpec::tv_nsec_
long tv_nsec_
Definition:
TimeSpec.h:25
TimeSpec::TimeSpec
TimeSpec()
Definition:
TimeSpec.h:9
value
Definition:
value.py:1
TimeSpec::TimeSpec
TimeSpec(timespec const &ts)
Definition:
TimeSpec.h:13
relativeConstraints.value
value
Definition:
relativeConstraints.py:53
TimeSpec::get_timespec
timespec get_timespec() const
Definition:
TimeSpec.cc:4
TimeSpec::tv_nsec
long tv_nsec() const
Definition:
TimeSpec.h:16
TimeSpec::set_tv_sec
void set_tv_sec(long value)
Definition:
TimeSpec.h:18
Generated for CMSSW Reference Manual by
1.8.14