27#include <cRIO/DataTypes.h>
37const uint64_t NSINSEC = 1000000000;
45inline double fromRaw(uint64_t raw) {
return ((
double)raw) / NSINSEC; }
54inline uint64_t
toRaw(
double timestamp) {
return (uint64_t)(timestamp * (double)NSINSEC); }
63inline double fromFPGA(uint64_t timestamp) {
return ((
double)timestamp) / NSINSEC; }
72inline uint64_t
toFPGA(
double timestamp) {
return (uint64_t)(timestamp * (double)NSINSEC); }
double fromFPGA(uint64_t timestamp)
Converts FPGA (nanoseconds) timestamp into seconds.
Definition Timestamp.h:63
uint64_t toFPGA(double timestamp)
Converts seconds into FPGA value (nanoseconds).
Definition Timestamp.h:72
uint64_t toRaw(double timestamp)
Converts seconds into raw value (nanoseconds).
Definition Timestamp.h:54
double fromRaw(uint64_t raw)
Converts raw (nanoseconds) timestamp into seconds.
Definition Timestamp.h:45