You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current implementation of this repository, useInterval of react-use is used, and the time is managed by adding or subtracting the number of seconds at regular intervals. There is a problem with this method.
There is a time difference between the actual time and the time managed by adding or subtracting the number of seconds. Depending on the processing system, there may be a time difference of several seconds per minute.
Solution
Get the current time with Date and calculate the difference to more accurately manage the time.
Another problem
Date is affected by the time managed by the browser or OS. The following problems may occur
The user changed the time of the OS
A leap second is inserted
More solution
Both 1 and 2 can be solved by measuring International Atomic Time (TAI), but there is no way to get this value in JavaScript on the browser.
As a method to get a value close to this, there is GeolocationPosition.timestamp. On the other hand, it requires the user's location information. There is no need to do this much at this point.
The text was updated successfully, but these errors were encountered:
In the current implementation of this repository,
useInterval
ofreact-use
is used, and the time is managed by adding or subtracting the number of seconds at regular intervals. There is a problem with this method.There is a time difference between the actual time and the time managed by adding or subtracting the number of seconds. Depending on the processing system, there may be a time difference of several seconds per minute.
Solution
Get the current time with
Date
and calculate the difference to more accurately manage the time.Another problem
Date
is affected by the time managed by the browser or OS. The following problems may occurMore solution
Both 1 and 2 can be solved by measuring International Atomic Time (TAI), but there is no way to get this value in JavaScript on the browser.
As a method to get a value close to this, there is
GeolocationPosition.timestamp
. On the other hand, it requires the user's location information. There is no need to do this much at this point.The text was updated successfully, but these errors were encountered: