background-sync icon indicating copy to clipboard operation
background-sync copied to clipboard

nit: minimum periodic sync intervals are times, not just integers

Open jyasskin opened this issue 5 years ago • 2 comments

https://wicg.github.io/BackgroundSync/spec/PeriodicBackgroundSync-index.html#constants defines "minimum periodic sync interval for any origin" and "minimum periodic sync interval across origins" as "long long"s, and then they're used as "Wait for minimum periodic sync interval across origins.". One can't wait for a long long; one waits for that number of milliseconds. So the constants could be defined as "a long long number of milliseconds" or, since they're never actually exposed to JS as far as I can tell, they could just be defined as "a time interval".

jyasskin avatar Dec 09 '19 18:12 jyasskin

It's pretty weird that this is milliseconds, since the expected time granularity is more like hours or days, but I suppose it aligns with setTimeout.

othermaciej avatar Dec 13 '19 21:12 othermaciej

(The other day I learned that this is called "scalar implicature".)

I subsequently filed https://github.com/whatwg/infra/issues/280 to see if we should encourage spec authors to talk in terms of "X hours" instead of defaulting to the only time type the platform currently has, DOMTimeStamp, an unsigned long long number of milliseconds.

jyasskin avatar Dec 13 '19 22:12 jyasskin