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

timestamp: Redefine timestamp in Data delivery #274

Merged
merged 5 commits into from
Jun 7, 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
20 changes: 15 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1107,17 +1107,27 @@ <h3>Data delivery</h3>
</li>
<li>
Let |state:PressureState| be an [=adjusted pressure state=] given |data| and |source|.
</li>
<li>
Let |timestamp:DOMHighResTimeStamp| be a timestamp representing the time the |data| was
obtained from the |relevantGlobal|'s [=platform collector=].
<aside class="note">
The |data| sample and mapping between |data| sample, and [=pressure states=],
is [=implementation-defined=] and may use many different metrics. For instance,
for CPU, it might consider processor frequency and utilization, as well
as thermal conditions.
</aside>
</li>
<li>
Let |timestamp| be a platform-specific timestamp converted in an [=implementation-defined=]
way to an [=monotonic clock/unsafe current time=] using the same [=monotonic clock=]
that is shared by [=environment settings object/time origins=].
<aside class="note">
The goal of this step is to ensure that a timestamp that may have been relative to
a different time origin is converted to a value that can be used in computations with
the same [=monotonic clock=] used by the operations described in [[HR-TIME]].
</aside>
</li>
<li>
Let |timeValue| be the [=relative high resolution time=] based on |timestamp| and
|relevantGlobal|.
</li>
<li>
[=list/For each=] |observer:PressureObserver| in |relevantGlobal|'s
[=registered observer list=] for |source|:
Expand All @@ -1138,7 +1148,7 @@ <h3>Data delivery</h3>
Let |record:PressureRecord| be a new {{PressureRecord}} object with its
{{PressureRecord/[[Source]]}} set to |source|,
{{PressureRecord/[[State]]}} set to |state|
and {{PressureRecord/[[Time]]}} set to |timestamp|.
and {{PressureRecord/[[Time]]}} set to |timeValue|.
</li>
<li>
If |observer|.{{PressureObserver/[[AfterPenaltyRecordMap]]}}[source] [=map/exists=]:
Expand Down
Loading