Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editorial: Remove the definition of "epoch-relative timestamp". #153

Merged
merged 3 commits into from
Mar 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 10 additions & 30 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -648,28 +648,6 @@ <h3>
the [=monotonic clock/unsafe current time=] of the <a>monotonic
clock</a>.
</p>
<p>
To get an <dfn data-export="">epoch-relative timestamp</dfn>,
optionally with a [=moment=] on the [=wall clock=] |time:moment on the
wall clock|:
</p>
<ol class="algorithm">
<li>If |time| was not passed, set |time| to the [=wall clock=]'s [=wall
clock/unsafe current time=].
</li>
<li>Assert: |time| is greater than or equal to 1 January 1970 00:00:00
UTC.
</li>
<li>Return the number of milliseconds from the [=Unix epoch=] to
|time|: where each day is comprised of 86,400 seconds, each of which is
1000 milliseconds long (i.e., don't account for leap seconds).
</li>
</ol>
<p class="note">
A {{DOMHighResTimeStamp}} is a double. Therefore, using it to represent
an [=epoch-relative timestamp=], e.g. for the purpose of comparing it
with <a>Date.now()</a>, might lose sub-millisecond precision.
</p>
jyasskin marked this conversation as resolved.
Show resolved Hide resolved
</section>
<section id="sec-domhighrestimestamp">
<h3>
Expand All @@ -689,6 +667,12 @@ <h3>
accurate enough to allow measurement while preventing timing attacks -
see <a href="#clock-resolution"></a> for additional considerations.
</p>
<p class="note">
A {{DOMHighResTimeStamp}} is a {{double}}, so it can only represent an
epoch-relative time&mdash;the number of milliseconds from the [=Unix
epoch=] to a [=moment=]&mdash;to a finite resolution. For [=moments=] in
2023, that resolution is approximately 0.2 microseconds.
</p>
</section>
<section>
<h3>
Expand All @@ -704,14 +688,10 @@ <h3>
</p>
</aside>
<p>
A {{EpochTimeStamp}} represents the number of milliseconds from a given
time to 01 January, 1970 00:00:00 UTC, excluding leap seconds.
Specifications that use this type define how the number of milliseconds
are interpreted. An {{EpochTimeStamp}} is initialized by calling
[=epoch-relative timestamp=] with no arguments, which defaults to the
current time. Specifications that require a different relative time can
call [=epoch-relative timestamp=] with a [=moment=] from the [=wall
clock=] as an argument, if needed.
A {{EpochTimeStamp}} represents an integral number of milliseconds from
the [=Unix epoch=] to a given [=moment=] on the [=wall clock=],
excluding leap seconds. Specifications that use this type define how the
number of milliseconds are interpreted.
</p>
</section>
<section id="sec-performance" data-dfn-for="Performance">
Expand Down