Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Major refactor #57

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

WIP: Major refactor #57

wants to merge 14 commits into from

Conversation

mielverkerken
Copy link
Member

No description provided.

Copy link
Collaborator

@matissecallewaert matissecallewaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good already! The only thing is testing this I assume?

fn update_active_idle_time(&mut self, timestamp: &DateTime<Utc>, threshold: f64) {
if timestamp.signed_duration_since(self.end_active).num_microseconds().unwrap() as f64 > threshold {
let duration = self.end_active.signed_duration_since(self.start_active);
if !duration.is_zero() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if this would ever occur, but what if the duration is smaller then zero?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants