Experimental Physics and
| |||||||||||||||||
|
Hi Eric,
On Wed, Oct 26, 2016 at 10:14 AM, Eric Norum <[email protected]> wrote: where "EPICS2UNIX_EPICS" is the 1990 to 1970 translation, and "stamp" is the struct of two unsigned integers. Like you say, that will not retain full precision. Your idea of separately storing these two integer fields as "seconds" and "nanoseconds" as attributes is a great idea. Will do.The pv.timestamp attribute returns the record time stamp as a floating point value. This provides 53 bits of significand. The ’seconds' now take about 31 bits leaving around 22 bits for fractional seconds so the resolution is only around 250 ns or so. Ah, yes, you are right. Currently, the pv.timestamp is calculated as EPICS2UNIX_EPOCH + stamp.secs + 1.e-6*int(1.e-9*stamp.nsec) Thanks, --Matt
| ||||||||||||||||
ANJ, 28 Oct 2016 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |