mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Update ReactFiberExpirationTime.js (#17825)
replaced 'add' with 'subtract'
This commit is contained in:
@@ -43,7 +43,7 @@ const MAGIC_NUMBER_OFFSET = Batched - 1;
|
||||
|
||||
// 1 unit of expiration time represents 10ms.
|
||||
export function msToExpirationTime(ms: number): ExpirationTime {
|
||||
// Always add an offset so that we don't clash with the magic number for NoWork.
|
||||
// Always subtract an offset so that we don't clash with the magic number for NoWork.
|
||||
return MAGIC_NUMBER_OFFSET - ((ms / UNIT_SIZE) | 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user