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: <p>Values $00 to $03 provide access to the latched (frozen) value of their respective live counters at the time of the last write to <tt>PERIPHERALS_COUNTER_LATCH</tt>. -<p>When <tt>PERIPHERALS_COUNTER_LATCH</tt> equals $80, the <tt>PERIPHERALS_COUNTER_VALUE</tt> -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. +<p>When <tt>PERIPHERALS_COUNTER_SELECT</tt> equals $80, the <tt>PERIPHERALS_COUNTER_VALUE</tt> +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. -<p>When <tt>PERIPHERALS_COUNTER_LATCH</tt> equals $81, the high 32 bits of <tt>PERIPHERALS_COUNTER_VALUE</tt> -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 +<p>When <tt>PERIPHERALS_COUNTER_SELECT</tt> equals $81, the high 32 bits of <tt>PERIPHERALS_COUNTER_VALUE</tt> +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 <tt>PERIPHERALS_COUNTER_VALUE</tt> will hold the nanoseconds since the start of that second. <p>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. -<p>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. +<p>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. <p>On reset, <tt>PERIPHERALS_COUNTER_SELECT</tt> is initialized to zero. If the <tt>PERIPHERALS_COUNTER_SELECT</tt> register holds a value other than one of the six values described above, all <tt>PERIPHERALS_COUNTER_VALUE</tt>