Skip to content

Commit

Permalink
fix time test
Browse files Browse the repository at this point in the history
So there's a tiny duration between startup and the very first update to time, not sure which is more useful to be people.
  • Loading branch information
maniwani committed Oct 22, 2021
1 parent 46d5e6e commit 6a57c25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_core/src/time/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ mod tests {
assert_eq!(time.speed_multiplier(), 1.0);
assert_eq!(
time.time_since_startup(),
second_update_instant - start_instant
second_update_instant - first_update_instant
);

// Make app time advance at 2x the rate of real world time.
Expand Down Expand Up @@ -295,7 +295,7 @@ mod tests {
assert_eq!(time.speed_multiplier(), 2.0);
assert_eq!(
time.time_since_startup(),
second_update_instant - start_instant + Duration::from_secs(2)
second_update_instant - first_update_instant + Duration::from_secs(2)
);
}
}

0 comments on commit 6a57c25

Please sign in to comment.