Skip to content

Commit 3f96653

Browse files
committed
Allow to compile for 32-bit targets
1 parent 5f34c61 commit 3f96653

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vm/src/stdlib/time_module.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn time_sleep(dur: Duration, vm: &VirtualMachine) -> PyResult<()> {
2020

2121
let mut ts = libc::timespec {
2222
tv_sec: std::cmp::min(libc::time_t::max_value() as u64, dur.as_secs()) as libc::time_t,
23-
tv_nsec: dur.subsec_nanos().into(),
23+
tv_nsec: dur.subsec_nanos() as _,
2424
};
2525
let res = unsafe { libc::nanosleep(&ts, &mut ts) };
2626
let interrupted = res == -1 && nix::errno::errno() == libc::EINTR;

0 commit comments

Comments
 (0)