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 2 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
34 changes: 34 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 |epoch|:
</p>
<ol>
<li>If |epoch| was not passed, set |epoch| to 00:00:00 UTC on 1 January
1970.
</li>
<li>Return the number of milliseconds from |epoch| to the current time.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ECMAScript spec uses "current time", so I just went with that... is that ok?

</li>
</ol>
</section>
<section id="sec-domhighrestimestamp">
<h3>
Expand All @@ -372,6 +383,29 @@ <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 milliseconds since some epoch
(i.e., a date and time in some timezone). Specifications that use this
type define how the number of milliseconds are interpreted. An
{{EpochTimeStamp}} is initialized by getting a [=epoch-relative
timestamp=] with no arguments, which defaults the epoch to the 01
January, 1970 UTC. Specifications that require a different epoch can
call [=epoch-relative timestamp=] with a different epoch, if needed.
</p>
</section>
<section id="sec-performance" data-dfn-for="Performance">
<h3>
The <dfn>Performance</dfn> interface
Expand Down