We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 388eed3 commit f4eb25eCopy full SHA for f4eb25e
doc/tutorial/ffi.md
@@ -183,7 +183,7 @@ microsecond-resolution timer.
183
fn gettimeofday(tv: *timeval, tz: *()) -> i32;
184
}
185
fn unix_time_in_microseconds() -> u64 unsafe {
186
- let x = {tv_sec: 0u32, tv_usec: 0u32};
+ let x = {mutable tv_sec: 0u32, mutable tv_usec: 0u32};
187
libc::gettimeofday(std::ptr::addr_of(x), std::ptr::null());
188
ret (x.tv_sec as u64) * 1000_000_u64 + (x.tv_usec as u64);
189
0 commit comments