Skip to content

Commit

Permalink
fix order of time comparisons
Browse files Browse the repository at this point in the history
Co-authored-by: phillip kammradt <phillip.kammradt@tuhh>
  • Loading branch information
schluis and phillip kammradt committed Apr 19, 2024
1 parent c42c921 commit de82c6b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/control/src/behavior/dribble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ pub fn precision_kick(
let time_difference = game_controller_state.last_game_state_change.map_or(
Duration::new(0, 0),
|last_game_state_change| {
last_game_state_change
.duration_since(now)
now.duration_since(last_game_state_change)
.expect("time ran backwords")
},
);
Expand Down

0 comments on commit de82c6b

Please sign in to comment.