-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert TrueTime to use Date.now #66
Conversation
This should be a simpler approach that has less risk of clock drift that can happen with `performance.now()` used over idle time-spans. Using our `trueTime.now()` when setting performance marks should ensure all timestamps are of the same type/time-scale.
Coverage Report for Auth (packages/auth)
File CoverageNo changed files found. |
Coverage Report for Common (packages/common)
File CoverageNo changed files found. |
Coverage Report for Event Producer (packages/event-producer)
File CoverageNo changed files found. |
Coverage Report for Player Web Components (packages/player-web-components)
File CoverageNo changed files found. |
Coverage Report for Template (packages/template)
File CoverageNo changed files found. |
Coverage Report for True Time (packages/true-time)
File Coverage
|
…eady synchronized within an hour
async synchronize() { | ||
if (this.#synced) { | ||
async synchronize(): Promise<void> { | ||
const anHour = 3_600_000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put 1_000_000 in PR since ChatGPT said this about NTP;
As a general guideline, a common default configuration for many systems is to synchronize every 64 to 1,024 seconds (approximately 1 to 17 minutes).
1 million ms is 16.67 minutes so figured that was nice. :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hehe, so that was where you got the number from :-P I figured an hour should be frequent enough..
This should be a simpler approach that has less risk of clock drift that can happen with
performance.now()
used over idle time-spans.Using our
trueTime.now()
when setting performance marks should ensure all timestamps are of the same type/time-scale.