ruffle
ruffle copied to clipboard
Use std::time::Duration for time intervals
#6075
I replaced the interval declared in f64 that I could find with ruffle_core::RuffleDuration.
Please let me know if you find any omissions in the f64-declared intervals, as they are difficult to find.
@relrelb Doesn't that conflict with what Mike was suggesting here? https://github.com/ruffle-rs/ruffle/issues/6075#issuecomment-1196072473 Or am I misunderstanding something?
Welome! I think
instant::Instantcan be used in place of the proposedRuffleDuration.instantis already a dependency ofruffle-core, and currently being used in various places across the codebase. So I'll be glad if you please proceed withinstant::Instant. Also, looks like the PR has conflicts against current master branch. Can you please resolve them while at it?
Right, I take my words back. I was confusing between instant and duration, which are not the same thing.
@relrelb I fixed conflict.
Welome! I think instant::Instant can be used in place of the proposed RuffleDuration. instant is already a dependency of ruffle-core, and currently being used in various places across the codebase. So I'll be glad if you please proceed with instant::Instant. Also, looks like the PR has conflicts against current master branch. Can you please resolve them while at it?
Right, I take my words back. I was confusing between instant and duration, which are not the same thing.
As for this one, the regression test failed due to lack of precision in std::Duration (same definition in instant::Duration), as I wrote in my comment here(https://github.com/ruffle-rs/ruffle/issues/6075#issuecomment-1193238908).
@Herschel Thanks for the review. I fixed the your review points.