tune the blink interval (#9)

* tune the blink interval

* update

* symmetric on/off tim
This commit is contained in:
Jimmy 2022-08-08 16:39:43 +08:00 committed by GitHub
parent 431b6b5b13
commit bf52c8f45f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -99,4 +99,4 @@ $ tclock -c '#e63946'
# License
MIT License.
MIT License, refer to [LICENSE](./LICENSE) for detail.

View file

@ -94,7 +94,7 @@ impl Widget for &Timer {
let result = execute(&self.execute);
*self.execute_result.borrow_mut() = Some(result);
}
if remaining_time.num_seconds() % 2 == 0 {
if (remaining_time.num_milliseconds()).abs() % 1000 < 500 {
return;
} else {
format_duration(Duration::zero(), self.format)