diff options
| author | Peter Atashian <retep998@gmail.com> | 2014-08-07 04:05:00 -0400 |
|---|---|---|
| committer | Peter Atashian <retep998@gmail.com> | 2014-08-07 04:05:00 -0400 |
| commit | feb219d23fd4236fc69ec86e34c088e232289534 (patch) | |
| tree | 460d17654ca883be34400eef5f1a17e0d8d54073 /src/libnative/io/util.rs | |
| parent | 51e19e750185f60e404412f702f8f2edc7bc1245 (diff) | |
| download | rust-feb219d23fd4236fc69ec86e34c088e232289534.tar.gz rust-feb219d23fd4236fc69ec86e34c088e232289534.zip | |
windows: Fix several tests on 64-bit.
Signed-off-by: Peter Atashian <retep998@gmail.com>
Diffstat (limited to 'src/libnative/io/util.rs')
| -rw-r--r-- | src/libnative/io/util.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libnative/io/util.rs b/src/libnative/io/util.rs index 06046cc74cf..97518bbf199 100644 --- a/src/libnative/io/util.rs +++ b/src/libnative/io/util.rs @@ -52,6 +52,14 @@ pub fn eof() -> IoError { } } +#[cfg(windows)] +pub fn ms_to_timeval(ms: u64) -> libc::timeval { + libc::timeval { + tv_sec: (ms / 1000) as libc::c_long, + tv_usec: ((ms % 1000) * 1000) as libc::c_long, + } +} +#[cfg(not(windows))] pub fn ms_to_timeval(ms: u64) -> libc::timeval { libc::timeval { tv_sec: (ms / 1000) as libc::time_t, |
