Compare commits
No commits in common. "37dc5c727a3d73778d6ee9d63c1468357cf0ed72" and "e3fd65e98be42b367aef019812375e418ef77448" have entirely different histories.
37dc5c727a
...
e3fd65e98b
2 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@ pub fn run_path() -> String {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn send_notifictation(msg: &str) {
|
pub fn send_notifictation(msg: &str) {
|
||||||
match Notification::new().summary(" Timers").body(msg).urgency(notify_rust::Urgency::Critical).show() {
|
match Notification::new().summary(" Timers").body(msg).show() {
|
||||||
Ok(_) => println!("Sent notification sucessfully."),
|
Ok(_) => println!("Sent notification sucessfully."),
|
||||||
Err(_) => println!("Failed to send notification."),
|
Err(_) => println!("Failed to send notification."),
|
||||||
};
|
};
|
||||||
|
|
|
@ -34,7 +34,7 @@ impl Timer {
|
||||||
|
|
||||||
/// Returns `true` if this [`Timer`] has expired
|
/// Returns `true` if this [`Timer`] has expired
|
||||||
pub fn is_expired(&self) -> bool {
|
pub fn is_expired(&self) -> bool {
|
||||||
let expired = self.remaining().is_zero();
|
let expired = Instant::now() - self.start > self.duration;
|
||||||
if expired {
|
if expired {
|
||||||
self.handle_expiration()
|
self.handle_expiration()
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue