Close unpaired spans on CTRL+D in live mode
This commit is contained in:
parent
1f532ead7f
commit
7d90764cbd
3 changed files with 8 additions and 3 deletions
|
|
@ -71,7 +71,12 @@ fn live_spans() -> Vec<Duration> {
|
|||
}
|
||||
}
|
||||
if let Some(unpaired) = seen {
|
||||
println!("Ended with an open span from {unpaired}... Ignoring");
|
||||
println!("Closing unpaired span now");
|
||||
let mut now = Local::now().naive_local().time();
|
||||
if now < unpaired {
|
||||
now = now + Duration::hours(12);
|
||||
}
|
||||
durations.push(now - unpaired);
|
||||
}
|
||||
return durations;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue