From 1b8a56cd7571d56849d8b66e47c73657ce18d168 Mon Sep 17 00:00:00 2001 From: "Arnaud (Arno) Mandy" Date: Fri, 7 Jun 2024 18:43:10 +0300 Subject: [PATCH] timestamp: Redefine timestamp in Data delivery (#274) Use more precise terms from the HR-TIME spec to define what `PressureRecord.time` is relative to: - Any timestamp value obtained from the platform is converted to an unsafe moment from the monotonic clock. - PressureRecord.[[Time]] converts it into a coarsened time relative to its global's origin. Fixes #257 --- index.html | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index a89e3df..fb45665 100644 --- a/index.html +++ b/index.html @@ -1129,10 +1129,6 @@

Data delivery

  • Let |state:PressureState| be an [=adjusted pressure state=] given |data| and |source|. -
  • -
  • - Let |timestamp:DOMHighResTimeStamp| be a timestamp representing the time the |data| was - obtained from the |relevantGlobal|'s [=platform collector=].
  • +
  • + 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 |timeValue| be the [=relative high resolution time=] based on |timestamp| and + |relevantGlobal|. +
  • [=list/For each=] |observer:PressureObserver| in |relevantGlobal|'s [=registered observer list=] for |source|: @@ -1160,7 +1170,7 @@

    Data delivery

    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|.
  • If |observer|.{{PressureObserver/[[AfterPenaltyRecordMap]]}}[source] [=map/exists=]: