-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid trueTime.now() throwing errors (#110)
* Avoid trueTime.now() throwing errors As it gets tricky to work with, this proposes to always return a time, even if that can be off initially. Also makes the module try to synchronize itself as early as possible, and tries to avoid double sync network calls.
- Loading branch information
Showing
4 changed files
with
16 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
import { TrueTime } from '@tidal-music/true-time'; | ||
|
||
export const trueTime = new TrueTime('https://api.tidal.com/v1/ping'); | ||
export { trueTime } from '@tidal-music/true-time'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters