diff --git a/doc/sim65.sgml b/doc/sim65.sgml index 2b99a6682..9f2914254 100644 --- a/doc/sim65.sgml +++ b/doc/sim65.sgml @@ -265,13 +265,13 @@ address range. Six values are currently defined:
Values $00 to $03 provide access to the latched (frozen) value of their respective live counters at the time of the last write to PERIPHERALS_COUNTER_LATCH. -
When PERIPHERALS_COUNTER_LATCH equals $80, the PERIPHERALS_COUNTER_VALUE -will be a 64-bit value corresponding to the number of nanoseconds elapsed since Midnight, Jan 1st, -1970 UTC, at the time of the last latch operation. +
When PERIPHERALS_COUNTER_SELECT equals $80, the PERIPHERALS_COUNTER_VALUE +will be a 64-bit value corresponding to the number of nanoseconds elapsed since the Unix epoch +(Midnight, Jan 1st, 1970 UTC), at the time of the last latch operation. -
When PERIPHERALS_COUNTER_LATCH equals $81, the high 32 bits of PERIPHERALS_COUNTER_VALUE -will be a 32-bit value corresponding to the number of seconds elapsed since Midnight, -Jan 1st, 1970 UTC, at the time of the last latch operation. The low 32 bits of +
When PERIPHERALS_COUNTER_SELECT equals $81, the high 32 bits of PERIPHERALS_COUNTER_VALUE +will be a 32-bit value corresponding to the number of seconds elapsed since the Unix epoch (Midnight, Jan 1st, +1970 UTC), at the time of the last latch operation. The low 32 bits of PERIPHERALS_COUNTER_VALUE will hold the nanoseconds since the start of that second.
The two different wallclock-time latch registers will always refer to precisely the same time instant. @@ -279,10 +279,10 @@ For some applications, the single 64-bit value measured in nanoseconds will be m for other applications, the split 32/32 bits representation with separate second and nanosecond values will be more convenient. -
Note that the definition above, with time elapsed measured since Midnight, Jan 1st, 1970 UTC, is -an approximation, as the implementation depends on the way POSIX definition time. Unfortunately, -POSIX does not account for leap seconds; it incorrectly assumes that all days are precisely 86400 seconds -long. +
Note that the time elapsed since the Unix epoch is an approximation, as the implementation depends on the +way POSIX defines time-since-the-epoch. Unfortunately, POSIX incorrectly assumes that all days are precisely +86400 seconds long, which is not true in case of leap seconds. The way this inconsistency is resolved is +system dependent.
On reset, PERIPHERALS_COUNTER_SELECT is initialized to zero. If the PERIPHERALS_COUNTER_SELECT register holds a value other than one of the six values described above, all PERIPHERALS_COUNTER_VALUE