Unstable default clock
Closed this issue · 1 comments
Nedgeva commented
Hey @raveclassic!
I've noticed that there possibility of data loss since default clock is always incrementing inner value either it's overflows or not:
Line 10 in 8c97587
While it's pretty uncommon to have such a large amount of updates it is still preferable to have handling logic of big numbers.
raveclassic commented
Hey @Nedgeva, thanks for the issue.
number
type is quite wide, assuming we tick every millisecond (Number.MAX_SAFE_INTEGER / 1000 / 60 / 60 / 24 / 365
), we'll have about 285616 years to wait for the overflow :D
I think it's not worth adding any checks that would hurt performance here.