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 'relative high resolution time' #95

Merged
merged 1 commit into from
Sep 21, 2020
Merged

Conversation

igneel64
Copy link
Contributor

@igneel64 igneel64 commented Sep 15, 2020

Fixes #87 by defining the concept of relative high resolution time .
Capable of being exported


Preview | Diff

index.html Outdated
<p>The <dfn data-export="">current high resolution time</dfn> is the high
resolution time from the <a>time origin</a> to the present time (typically
<p>The <dfn data-export="">relative high resolution time</dfn> is the high
resolution time from the <a>time origin</a> to a specific <i>time</i> value.</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe something like """
The relative high resolution time given time, a DOMHighResTimestamp, and global, a Global Object, runs the following steps:

  • Let diff be time minus global's time origin
  • Return diff
    """

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does that seem reasonable ?

    <div algorithm="relative high resolution time">
      The <dfn data-export="">relative high resolution time</dfn> given 
      <i>time</i>, a {{DOMHighResTimeStamp}}, and global, a [=Realm/global object=],
       runs the following steps:
      1.  Let |diff| be the difference between <i>time</i> and the <i>global</i>'s <a>time origin</a>.
      1.  Return |diff|.
    </div>

Copy link
Contributor

Choose a reason for hiding this comment

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

|time| and |global|, but otherwise, LG

index.html Outdated
<p>The <dfn data-export="">relative high resolution time</dfn> is the high
resolution time from the <a>time origin</a> to a specific <i>time</i> value.</p>
<p>The <dfn data-export="">current high resolution time</dfn> is the
<a>relative high resolution time</a> to the present time (typically
called "now").</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed, we can drop the "typically called now" bit

index.html Outdated
</p>
<p>The <dfn data-export="">current high resolution time</dfn> is the
<a>relative high resolution time</a> where <i>time</i> is the present time
and <i>global</i> is the [=Realm/global object=].</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

s/is the/returns the result of/
also "global is the context object's relevant global object"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we mention context, are we ok with adding the context reference ?

    <p>The <dfn data-export="">current high resolution time</dfn> returns the 
    result of <a>relative high resolution time</a> where <i>time</i> is the 
    present time and <i>global</i> is the <dfn data-no-export="" data-cite=
    "DOM#context-object">context object</dfn>'s relevant 
    [=Realm/global object=].</p>

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup!!

Copy link
Contributor

Choose a reason for hiding this comment

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

Wait, you don't need to define the context object, you need to reference it

Copy link
Contributor

Choose a reason for hiding this comment

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

so <a> instead of <dfn>

Copy link

Choose a reason for hiding this comment

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

QQ: When do we use [= =] vs <a>? ReSpec seems to suggest always using shorthands

@igneel64 igneel64 force-pushed the gh-pages branch 2 times, most recently from 074e9de to b9419c8 Compare September 15, 2020 16:56
index.html Outdated
The <dfn data-export="">relative high resolution time</dfn> given |time|,
a {{DOMHighResTimeStamp}}, and |global|, a [=Realm/global object=],
runs the following steps:
1. Let |diff| be the difference between |time| and the |global|'s <a>time origin</a>.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you replace the markdown with <ul> and <li>? Seems like it's not working automagically :/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Replaced :D

Copy link
Contributor

@yoavweiss yoavweiss left a comment

Choose a reason for hiding this comment

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

LGTM % broken style because markdown doesn't work...

@yoavweiss
Copy link
Contributor

^^ @plehegar @caribouW3 for the IPR bits

index.html Outdated
</div>
</p>
<p>The <dfn data-export="">current high resolution time</dfn> returns the
result of <a>relative high resolution time</a> where <i>time</i> is the
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: |time| and |global| here as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks for catching this up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide hook for getting a high resolution time between time origin and a "time"
3 participants