Skip to content

Commit

Permalink
fix microsecond calculation for TimeSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanvanSchaik committed Aug 21, 2022
1 parent 2a8b438 commit 7109eb9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ This project adheres to [Semantic Versioning](https://semver.org/).

### Fixed

- Fix microsecond calculation for `TimeSpec`.
([#1801](https://github.com/nix-rust/nix/pull/1801))

### Removed

## [0.25.0] - 2022-08-13
Expand Down
2 changes: 1 addition & 1 deletion src/sys/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ impl TimeValLike for TimeSpec {
}

fn num_microseconds(&self) -> i64 {
self.num_nanoseconds() / 1_000_000_000
self.num_nanoseconds() / 1_000
}

fn num_nanoseconds(&self) -> i64 {
Expand Down

0 comments on commit 7109eb9

Please sign in to comment.