|
McStas Readout Master 0.8.0
|
ESS EFU two-integer timestamp: whole seconds since the UNIX epoch plus ticks of the 88.052499 MHz readout clock within the second. More...
#include <efu_time.h>
Public Member Functions | |
| efu_time (const uint32_t high, const uint32_t low) | |
| A time equivalent to that used in the ESS Event-Formation-Unit. | |
| efu_time (const std::pair< uint32_t, uint32_t > &p) | |
| efu_time (const double time) | |
| Conversion from floating point time representation. | |
| efu_time () | |
| Use the system clock to construct an EFU consistent time stamp. | |
| uint32_t | high () const |
| uint32_t | low () const |
| bool | operator== (const efu_time &other) const |
| bool | operator< (const efu_time &other) const |
| bool | operator> (const efu_time &other) const |
| bool | operator>= (const efu_time &other) const |
| bool | operator>= (const efu_time *other) const |
| efu_time | operator+ (const efu_time &other) const |
| efu_time | operator+ (const efu_time *other) const |
| efu_time | operator- (const efu_time &other) const |
| efu_time | operator- (const efu_time *other) const |
| uint64_t | total_ticks () const |
| uint64_t | total_nanoseconds () const |
| uint32_t | operator/ (const efu_time &other) const |
| efu_time | operator* (const uint32_t m) const |
| efu_time | operator% (const efu_time &m) const |
| efu_time | operator% (const efu_time *m) const |
Static Public Member Functions | |
| static efu_time | from_nanoseconds (const uint64_t ns) |
| Nanoseconds since the UNIX epoch, to the nearest tick. | |
| static uint64_t | now_nanoseconds () |
| The system clock, in nanoseconds since the UNIX epoch. | |
Static Public Attributes | |
| static constexpr uint64_t | ticks = 88052499 |
Protected Attributes | |
| uint32_t | _h |
| uint32_t | _l |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const efu_time &dt) |
| std::ostream & | operator<< (std::ostream &os, const efu_time *dt) |
ESS EFU two-integer timestamp: whole seconds since the UNIX epoch plus ticks of the 88.052499 MHz readout clock within the second.
Arithmetic keeps the tick field normalized (always less than one second's worth of ticks), matching how the EFU interprets the high/low pair.
Definition at line 19 of file efu_time.h.
|
inline |
A time equivalent to that used in the ESS Event-Formation-Unit.
| high | seconds since the UNIX epoch, 1970-01-01 00:00 |
| low | number of clock ticks in a 88.052499 MHz oscillator |
Definition at line 31 of file efu_time.h.
|
inlineexplicit |
Definition at line 38 of file efu_time.h.
|
inlineexplicit |
Conversion from floating point time representation.
| time | seconds since the UNIX epoch |
Definition at line 44 of file efu_time.h.
|
inline |
Use the system clock to construct an EFU consistent time stamp.
Definition at line 50 of file efu_time.h.
|
inlinestatic |
Nanoseconds since the UNIX epoch, to the nearest tick.
Definition at line 120 of file efu_time.h.
|
inline |
Definition at line 60 of file efu_time.h.
|
inline |
Definition at line 61 of file efu_time.h.
|
inlinestatic |
The system clock, in nanoseconds since the UNIX epoch.
Definition at line 132 of file efu_time.h.
Referenced by Readout::update_time().
Definition at line 151 of file efu_time.h.
Definition at line 155 of file efu_time.h.
|
inline |
Definition at line 141 of file efu_time.h.
Definition at line 85 of file efu_time.h.
Definition at line 91 of file efu_time.h.
Definition at line 95 of file efu_time.h.
Definition at line 106 of file efu_time.h.
|
inline |
Definition at line 137 of file efu_time.h.
|
inline |
Definition at line 66 of file efu_time.h.
|
inline |
Definition at line 63 of file efu_time.h.
|
inline |
Definition at line 71 of file efu_time.h.
|
inline |
Definition at line 77 of file efu_time.h.
|
inline |
Definition at line 81 of file efu_time.h.
|
inline |
Definition at line 114 of file efu_time.h.
|
inline |
Definition at line 110 of file efu_time.h.
|
friend |
Definition at line 159 of file efu_time.h.
|
friend |
Definition at line 163 of file efu_time.h.
|
protected |
Definition at line 21 of file efu_time.h.
|
protected |
Definition at line 22 of file efu_time.h.
|
staticconstexpr |
Definition at line 24 of file efu_time.h.