We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
From<Timestamp> for time::Duration
I know this should be a pull request but in
impl From<Timestamp> for time::Duration { fn from(ts: Timestamp) -> Self { time::Duration::new(ts.sec as u64, (ts.usec / 1000) as u32) } }
ts.usec should be multiplied by 1000 and not divided
ts.usec
The text was updated successfully, but these errors were encountered:
And now that I'm looking at that part of the code, From<time::Duration> for Timestamp looks incorrect too - I think in the line
From<time::Duration> for Timestamp
Timestamp::new(duration.as_secs() as time_t, duration.as_micros() as time_t)
duration.as_micros() should be duration.subsec_micros()
duration.as_micros()
duration.subsec_micros()
Sorry, something went wrong.
timestamp: Fix std::time::Duration conversions
3d8a217
Fixes #27. Signed-off-by: Christopher N. Hesse <raymanfx@gmail.com>
c2949e8
raymanfx
No branches or pull requests
I know this should be a pull request but in
ts.usec
should be multiplied by 1000 and not dividedThe text was updated successfully, but these errors were encountered: