time: Calculate period to wait on each iteration (#237)

Computing the delay only once won't work; it has to be be done each time
to stay properly in sync.

The time widget should now reliably update at the minute.

Co-authored-by: Michael Murphy <michael@mmurphy.dev>
This commit is contained in:
Ian Douglas Scott 2024-02-27 13:51:42 -08:00 committed by GitHub
parent 43de23e94a
commit fee7eefe5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 22 deletions

1
Cargo.lock generated
View file

@ -1035,6 +1035,7 @@ dependencies = [
"nix 0.26.4",
"once_cell",
"rust-embed 6.8.1",
"tokio",
"tracing",
]