]> git.lizzy.rs Git - rust.git/commit
std: Fix overflow when subtracting Instant
authorAlex Crichton <alex@alexcrichton.com>
Tue, 15 Mar 2016 22:19:11 +0000 (15:19 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 15 Mar 2016 22:19:11 +0000 (15:19 -0700)
commit0943b1668d9dcf486a77a97d6c28ccd64ffed609
treeef04d23bc4679a7aac836b12cf2136d31da275c1
parent1efa752ea694f7ae125cdaf7911ad44b8e6b0e33
std: Fix overflow when subtracting Instant

This code was currently only exercised on OSX, but this applies the same method
of subtraction used on Linux which doesn't have the same overflow issues.

Note that this currently includes no tests, but that's because this is only
visible with debug assertions enabled. Soon, however, I'll enable debug
assertions on all auto builds on the bots so we should get testing for this.

Closes #32268
src/libstd/sys/unix/time.rs