-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Move lag compensation and clock improvements #1135
base: main
Are you sure you want to change the base?
Conversation
@@ -1,122 +1,99 @@ | |||
import 'dart:async'; | |||
|
|||
import 'package:clock/clock.dart'; |
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.
Why are we using this package for the countdown clock widget ?
I don't see why Datetime.now
and the builtin Stopwatch
would not work.
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.
To be able to test the clocks. Contrary to DateTime
, clock
is overridden in fakeAsync
environment. So we can reliably measure the elapsed time in tests.
Make the real time game clocks more precise by implementing:
A new chess clock for playable games with:
An update of
CountdownClock
widget:The latter is no more used for playable game, only for read-only display of clocks where live clock ticking is needed (TV, broadcast, etc).