Skip to content

Commit 3a6fa23

Browse files
author
Raphael Kubo da Costa
authored
data delivery: Set timestamp as an "unsafe shared current time" (#280)
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.
1 parent c0df533 commit 3a6fa23

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

index.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,13 +1137,14 @@

Data delivery

11371137
aside>
11381138
li>
11391139
<li>
1140-
Let |timestamp| be a platform-specific timestamp converted in an [=implementation-defined=]
1141-
way to an [=monotonic clock/unsafe current time=] using the same [=monotonic clock=]
1142-
that is shared by [=environment settings object/time origins=].
1140+
Let |timestamp| be the [=unsafe shared current time=] corresponding
1141+
to the moment when |data| was obtained from |relevantGlobal|'s
1142+
[=platform collector=].
11431143
<aside class="note">
1144-
The goal of this step is to ensure that a timestamp that may have been relative to
1145-
a different time origin is converted to a value that can be used in computations with
1146-
the same [=monotonic clock=] used by the operations described in [[HR-TIME]].
1144+
The goal of this step is to ensure that the same [=monotonic
1145+
clock/unsafe current time=] is used across all globals. The value is
1146+
then converted into a global-specific, [=coarsened moment=] in the
1147+
step below.
11471148
aside>
11481149
li>
11491150
<li>

0 commit comments

Comments
 (0)