mirror of
https://github.com/2e3s/awatcher.git
synced 2025-06-05 19:15:33 +00:00
fix: include duration for a more accurate time calculation
This commit is contained in:
parent
d3b9adf91c
commit
2880ebe6a3
@ -87,7 +87,8 @@ impl ReportClient {
|
||||
let event = AwEvent {
|
||||
id: None,
|
||||
timestamp: Utc::now(),
|
||||
duration: Duration::zero(),
|
||||
// Added one nano second to ensure the event is not filtered out by https://github.com/ActivityWatch/aw-webui/blob/cf74080d12ffd53d37c83e3e0eddaf952fe14a62/src/visualizations/VisTimeline.vue#L108
|
||||
duration: Duration::from_std(self.config.poll_time_window).unwrap() + Duration::nanoseconds(1),
|
||||
data,
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user