Skip to content

Commit c2c7b48

Browse files
committed
---
yaml --- r: 7842 b: refs/heads/snap-stage3 c: 6d360d2 h: refs/heads/master v: v3
1 parent 5420c73 commit c2c7b48

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 5e250b695113c87e2183bb3b03160ae02fd748d1
4+
refs/heads/snap-stage3: 6d360d2b026dbfd9cd8a5dc1b25e452c7fa544ee
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/doc/tutorial.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2334,17 +2334,19 @@ microsecond-resolution timer.
23342334

23352335
~~~~
23362336
use std;
2337-
type timeval = {mutable tv_sec: u32,
2338-
mutable tv_usec: u32};
2337+
type timeval = {mutable tv_sec: uint,
2338+
mutable tv_usec: uint};
23392339
#[nolink]
23402340
native mod libc {
23412341
fn gettimeofday(tv: *timeval, tz: *()) -> i32;
23422342
}
23432343
fn unix_time_in_microseconds() -> u64 unsafe {
2344-
let x = {mutable tv_sec: 0u32, mutable tv_usec: 0u32};
2344+
let x = {mutable tv_sec: 0u, mutable tv_usec: 0u};
23452345
libc::gettimeofday(ptr::addr_of(x), ptr::null());
23462346
ret (x.tv_sec as u64) * 1000_000_u64 + (x.tv_usec as u64);
23472347
}
2348+
2349+
# fn main() { assert #fmt("%?", unix_time_in_microseconds()) != ""; }
23482350
~~~~
23492351

23502352
The `#[nolink]` attribute indicates that there's no native library to link

0 commit comments

Comments
 (0)