Skip to content

Commit

Permalink
data delivery: Set timestamp as an "unsafe shared current time"
Browse files Browse the repository at this point in the history
Follow-up to #274, related to #257.

The wording used in #274, which mentions platform-specific timestamps, made
more sense in the context of the Generic Sensor API spec, as multiple
platform-specific sensor APIs provide samples with timestamps in a
platform-specific format that needs to be converted.

Of the OS-provided telemetry APIs, however, only Windows optionally provides
samples with a timestamp. As such, it makes more sense to define a timestamp
using the monotonic clock's unsafe current time instead. Aditionally, the
accompanying note was rewritten to indicate that the same value should be
used for all globals, otherwise the same sample would end up with different
"raw" timestamps in different frames/workers.
  • Loading branch information
Raphael Kubo da Costa committed Jun 12, 2024
1 parent 1b8a56c commit b3f6829
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1137,13 +1137,14 @@ <h3>Data delivery</h3>
</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=].
Let |timestamp| be [=unsafe shared current time=] corresponding to
the moment when |data| was obtained from |relevantGlobal|'s
[=platform collector=].
<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]].
The goal of this step is to ensure that the same [=monotonic
clock/unsafe current time=] is used across all globals. The value is
then converted into a global-specific, [=coarsened moment=] in the
step below.
</aside>
</li>
<li>
Expand Down

0 comments on commit b3f6829

Please sign in to comment.