]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #10447 : alexcrichton/rust/flaky-time-test, r=catamorphism
authorbors <bors@rust-lang.org>
Wed, 13 Nov 2013 21:31:24 +0000 (13:31 -0800)
committerbors <bors@rust-lang.org>
Wed, 13 Nov 2013 21:31:24 +0000 (13:31 -0800)
This test was failing periodically on windows and other platforms, and in
debugging the issue locally I've found that the previous test was failing
at the assertion `ns0 <= ns1`. Upon inspecting the values, the two numbers were
very close to one another, but off by a little bit.

I believe that this is because `precise_time_s` goes from `u64` -> `f64` and
then we go again back to `u64` for the assertion. This conversion is a lossy one
that's not always guaranteed to succeed, so instead I've changed the test to
only compare against u64 instances.

1  2 
src/libextra/time.rs

Simple merge