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

Define the EpochTimeStamp typedef #124

Merged
merged 5 commits into from Oct 9, 2021
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 35 additions & 0 deletions index.html
Expand Up @@ -352,6 +352,17 @@ <h3>
The <dfn data-export="">unsafe shared current time</dfn> must return
the current value of the <a>shared monotonic clock</a>.
</p>
<p>
To get an <dfn data-export="">epoch-relative timestamp</dfn>,
optionally with a date-time |time|:
</p>
<ol>
<li>If |time| was not passed, set |time| to the current time.
</li>
<li>Return the number of milliseconds from 1 January 1970 00:00:00 UTC
to |time|.
</li>
</ol>
</section>
<section id="sec-domhighrestimestamp">
<h3>
Expand All @@ -372,6 +383,30 @@ <h3>
see <a href="#clock-resolution"></a> for additional considerations.
</p>
</section>
<section>
<h3>
The <dfn>EpochTimeStamp</dfn> typedef
</h3>
<pre class="idl">
typedef unsigned long long EpochTimeStamp;
</pre>
<aside class="note" title="Legacy platform feature">
<p>
The use of `EpochTimeStamp`, known previously as `DOMTimeStamp`, is
discouraged. Wherever possible use {{DOMHighResTimeStamp}} instead.
</p>
</aside>
<p>
A {{EpochTimeStamp}} represents the number of milliseconds from a given
time to 01 January, 1970 00:00:00 UTC. Specifications that use this
marcoscaceres marked this conversation as resolved.
Show resolved Hide resolved
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 date-time as an argument, if
needed.
</p>
</section>
<section id="sec-performance" data-dfn-for="Performance">
<h3>
The <dfn>Performance</dfn> interface
Expand Down