Main Page
Namespaces
Classes
Package Documentation
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
9
public
:
10
11
TimeSpec
() :
12
tv_sec_
(0),
13
tv_nsec_
(0) {}
14
15
TimeSpec
(
long
tv_sec
,
long
tv_nsec
) :
16
tv_sec_
(tv_sec),
17
tv_nsec_
(tv_nsec) {}
18
19
TimeSpec
(timespec
const
& ts) :
20
tv_sec_
(static_cast<long>(ts.
tv_sec
)),
21
tv_nsec_
(static_cast<long>(ts.
tv_nsec
)) {}
22
23
long
tv_sec
()
const
{
return
tv_sec_
; }
24
long
tv_nsec
()
const
{
return
tv_nsec_
; }
25
26
void
set_tv_sec
(
long
value
) {
tv_sec_
=
value
; }
27
void
set_tv_nsec
(
long
value
) {
tv_nsec_
=
value
; }
28
29
timespec
get_timespec
()
const
;
30
31
private
:
32
33
long
tv_sec_
;
// seconds
34
long
tv_nsec_
;
// nanoseconds
35
};
36
37
#endif
TimeSpec::tv_sec
long tv_sec() const
Definition:
TimeSpec.h:23
TimeSpec::set_tv_nsec
void set_tv_nsec(long value)
Definition:
TimeSpec.h:27
TimeSpec::tv_nsec
long tv_nsec() const
Definition:
TimeSpec.h:24
TimeSpec::get_timespec
timespec get_timespec() const
Definition:
TimeSpec.cc:4
TimeSpec
Definition:
TimeSpec.h:7
TimeSpec::tv_sec_
long tv_sec_
Definition:
TimeSpec.h:33
TimeSpec::TimeSpec
TimeSpec(long tv_sec, long tv_nsec)
Definition:
TimeSpec.h:15
TimeSpec::tv_nsec_
long tv_nsec_
Definition:
TimeSpec.h:34
TimeSpec::TimeSpec
TimeSpec()
Definition:
TimeSpec.h:11
value
Definition:
value.py:1
TimeSpec::TimeSpec
TimeSpec(timespec const &ts)
Definition:
TimeSpec.h:19
relativeConstraints.value
value
Definition:
relativeConstraints.py:52
TimeSpec::set_tv_sec
void set_tv_sec(long value)
Definition:
TimeSpec.h:26
Generated for CMSSW Reference Manual by
1.8.11