mirror of
https://github.com/2e3s/awatcher.git
synced 2025-06-07 12:05:49 +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 {
|
let event = AwEvent {
|
||||||
id: None,
|
id: None,
|
||||||
timestamp: Utc::now(),
|
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,
|
data,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user