]> git.lizzy.rs Git - rust.git/commit
libstd: Limit Duration range to i64 milliseconds.
authorRuud van Asseldonk <dev@veniogames.com>
Thu, 21 Aug 2014 07:37:30 +0000 (09:37 +0200)
committerRuud van Asseldonk <dev@veniogames.com>
Thu, 21 Aug 2014 09:28:50 +0000 (11:28 +0200)
commit26af5da6d4ca7ee3e7cec0333b2465a1c65e1171
treee3b5fc6d5899530720ae7dfffeeb40fd5ce89b03
parent39133efebf49823002977f0ad0ac12edf27b4d06
libstd: Limit Duration range to i64 milliseconds.

This enables `num_milliseconds` to return an `i64` again instead of
`Option<i64>`, because it is guaranteed not to overflow.

The Duration range is now rougly 300e6 years (positive and negative),
whereas it was 300e9 years previously. To put these numbers in
perspective, 300e9 years is about 21 times the age of the universe
(according to Wolfram|Alpha). 300e6 years is about 1/15 of the age of
the earth (according to Wolfram|Alpha).
src/libstd/io/net/tcp.rs
src/libstd/io/net/unix.rs
src/libstd/io/timer.rs
src/libstd/time/duration.rs