MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / msToExpirationTime

Function msToExpirationTime

code/styling/public/app.js:6784–6787  ·  view source on GitHub ↗
(ms)

Source from the content-addressed store, hash-verified

6782
6783// 1 unit of expiration time represents 10ms.
6784function msToExpirationTime(ms) {
6785 // Always add an offset so that we don't clash with the magic number for NoWork.
6786 return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;
6787}
6788
6789function expirationTimeToMs(expirationTime) {
6790 return (expirationTime - MAGIC_NUMBER_OFFSET) * UNIT_SIZE;

Callers 2

ReactFiberSchedulerFunction · 0.70
recalculateCurrentTimeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected