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

Add the HostSystemUTCEpochNanoseconds abstract operation #9038

Merged
merged 2 commits into from
Jun 19, 2024
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
61 changes: 47 additions & 14 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2937,6 +2937,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x-href="https://tc39.es/ecma262/#sec-automatic-semicolon-insertion">automatic semicolon insertion</dfn></li>
<li><dfn data-x-href="https://tc39.es/ecma262/#sec-candidate-executions">candidate execution</dfn></li>
<li>The <dfn data-x-href="https://tc39.es/ecma262/#current-realm">current realm</dfn></li>
<li><dfn data-x-href="https://tc39.es/ecma262/#clamping">clamping</dfn> a mathematical value</li>
<li><dfn data-x-href="https://tc39.es/ecma262/#early-error-rule">early error</dfn></li>
<li><dfn data-x-href="https://tc39.es/ecma262/#sec-forward-progress">forward progress</dfn></li>
<li><dfn data-x-href="https://tc39.es/ecma262/#sec-invariants-of-the-essential-internal-methods">invariants of the essential internal methods</dfn></li>
Expand Down Expand Up @@ -3102,6 +3103,15 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<ul class="brief">
<li>The <dfn data-x-href="https://tc39.es/proposal-resizablearraybuffer/#sec-isarraybufferviewoutofbounds">IsArrayBufferViewOutOfBounds</dfn> abstract operation</li>
</ul>

<p>User agents that support JavaScript must also implement the <cite>Temporal</cite> proposal.
The following terms are defined there, and used in this specification: <ref>JSTEMPORAL</ref></p>

<ul class="brief">
<li>The <dfn data-x="js-HostSystemUTCEpochNanoseconds" data-x-href="https://tc39.es/proposal-temporal/#sec-hostsystemutcepochnanoseconds">HostSystemUTCEpochNanoseconds</dfn> abstract operation</li>
<li>The <dfn data-x-href="https://tc39.es/proposal-temporal/#eqn-nsMaxInstant">nsMaxInstant</dfn> and
<dfn data-x-href="https://tc39.es/proposal-temporal/#eqn-nsMinInstant">nsMinInstant</dfn> values</li>
</ul>
</dd>

<dt>WebAssembly</dt>
Expand Down Expand Up @@ -3397,20 +3407,20 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x-href="https://fullscreen.spec.whatwg.org/#fullscreen-flag">fullscreen flag</dfn></li>
</ul>

<p><cite>High Resolution Time</cite> provides the <dfn
data-x-href="https://w3c.github.io/hr-time/#dfn-current-high-resolution-time">current high
resolution time</dfn>, the <dfn
data-x-href="https://w3c.github.io/hr-time/#dfn-relative-high-resolution-time">relative high
resolution time</dfn>, the <dfn
data-x-href="https://w3c.github.io/hr-time/#dfn-unsafe-shared-current-time">unsafe shared
current time</dfn>, the <dfn
data-x-href="https://w3c.github.io/hr-time/#dfn-shared-monotonic-clock">shared monotonic clock</dfn>,
the <dfn data-x-href="https://w3c.github.io/hr-time/#dfn-unsafe-moment">unsafe moment</dfn>,
the <dfn data-x-href="https://w3c.github.io/hr-time/#dfn-duration-from">duration from</dfn>,
the <dfn data-x-href="https://w3c.github.io/hr-time/#dfn-coarsen-time">coarsen time</dfn>
algorithm, and the <dfn
data-x-href="https://w3c.github.io/hr-time/#dom-domhighrestimestamp"><code>DOMHighResTimeStamp</code></dfn>
typedef. <ref>HRT</ref></p>
<p><cite>High Resolution Time</cite> provides the following features: <ref>HRT</ref></p>

<ul class="brief">
<li><dfn data-x-href="https://w3c.github.io/hr-time/#dfn-current-high-resolution-time">current high resolution time</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/hr-time/#dfn-relative-high-resolution-time">relative high resolution time</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/hr-time/#dfn-unsafe-shared-current-time">unsafe shared current time</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/hr-time/#dfn-shared-monotonic-clock">shared monotonic clock</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/hr-time/#dfn-unsafe-moment">unsafe moment</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/hr-time/#dfn-duration-from">duration from</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/hr-time/#dfn-coarsen-time">coarsen time</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/hr-time/#dfn-current-wall-time">current wall time</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/hr-time/#dfn-unix-epoch">Unix epoch</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/hr-time/#dom-domhighrestimestamp"><code>DOMHighResTimeStamp</code></dfn></li>
</ul>
</dd>


Expand Down Expand Up @@ -108948,6 +108958,26 @@ dictionary <dfn dictionary>PromiseRejectionEventInit</dfn> : <span>EventInit</sp
</li>
</ol>

<h5 id="hostsystemutcepochnanoseconds"><dfn>HostSystemUTCEpochNanoseconds</dfn>(<var>global</var>)</h5>

<p>The Temporal proposal contains an <span>implementation-defined</span> <span
data-x="js-HostSystemUTCEpochNanoseconds">HostSystemUTCEpochNanoseconds</span> abstract operation.
User agents must use the following implementation: <ref>JSTEMPORAL</ref></p>

<ol>
<li><p>Let <var>settingsObject</var> be <var>global</var>'s <span>relevant settings
object</span>.</p></li>

<li><p>Let <var>time</var> be <var>settingsObject</var>'s <span>current wall
time</span>.</p></li>

<li><p>Let <var>ns</var> be the number of nanoseconds from the <span>Unix epoch</span> to
<var>time</var>, rounded to the nearest integer.</p></li>

<li><p>Return the result of <span>clamping</span> <var>ns</var> between
<span>nsMinInstant</span> and <span>nsMaxInstant</span>.</p></li>
</ol>

<h5 id="integration-with-javascript-jobs">Job-related host hooks</h5>

<p>The JavaScript specification defines Jobs to be scheduled and run later by the host, as well as
Expand Down Expand Up @@ -143072,6 +143102,9 @@ INSERT INTERFACES HERE
<dt id="refsJSON">[JSON]</dt>
<dd><cite><a href="https://www.rfc-editor.org/rfc/rfc8259">The JavaScript Object Notation (JSON) Data Interchange Format</a></cite>, T. Bray. IETF.</dd>

<dt id="refsJSTEMPORAL">[JSTEMPORAL]</dt>
<dd><cite><a href="https://tc39.es/proposal-temporal/">Temporal</a></cite>. Ecma International.</dd>

<dt id="refsLONGTASKS">[LONGTASKS]</dt>
<dd><cite><a href="https://w3c.github.io/longtasks/">Long Tasks</a></cite>, D. Denicola, I. Grigorik, S. Panicker. W3C.</dd>

Expand Down
Loading