Skip to content

Commit 7109eb9

Browse files
fix microsecond calculation for TimeSpec
1 parent 2a8b438 commit 7109eb9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1313

1414
### Fixed
1515

16+
- Fix microsecond calculation for `TimeSpec`.
17+
([#1801](https://github.com/nix-rust/nix/pull/1801))
18+
1619
### Removed
1720

1821
## [0.25.0] - 2022-08-13

src/sys/time.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ impl TimeValLike for TimeSpec {
319319
}
320320

321321
fn num_microseconds(&self) -> i64 {
322-
self.num_nanoseconds() / 1_000_000_000
322+
self.num_nanoseconds() / 1_000
323323
}
324324

325325
fn num_nanoseconds(&self) -> i64 {

0 commit comments

Comments
 (0)