ruffle icon indicating copy to clipboard operation
ruffle copied to clipboard

Use std::time::Duration for time intervals

Open higumachan opened this issue 3 years ago • 0 comments

#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.

higumachan avatar Aug 09 '22 05:08 higumachan

@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?

n0samu avatar Aug 10 '22 20:08 n0samu

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.

relrelb avatar Aug 12 '22 08:08 relrelb

@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).

higumachan avatar Aug 13 '22 09:08 higumachan

@Herschel Thanks for the review. I fixed the your review points.

higumachan avatar Sep 02 '22 10:09 higumachan