diff options
| author | Eric Holk <eholk@mozilla.com> | 2011-06-28 17:58:44 -0700 |
|---|---|---|
| committer | Eric Holk <eholk@mozilla.com> | 2011-06-30 11:32:10 -0700 |
| commit | b4a145e60f4bbc90dc780239cc49c024b9f52ca8 (patch) | |
| tree | 020734b92aa7fea2269b3915d45d1d9730c4192c /src/rt/rust_builtin.cpp | |
| parent | 441c7e06109772f7ff942682fb6d0a7535f03666 (diff) | |
| download | rust-b4a145e60f4bbc90dc780239cc49c024b9f52ca8.tar.gz rust-b4a145e60f4bbc90dc780239cc49c024b9f52ca8.zip | |
Added a nanosecond timer to time.rs, support for some floating point casts, and a commandline-driven mode for pfib.rs
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 5b5844fc135..0ccc83435f7 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -612,6 +612,12 @@ get_time(rust_task *task, uint32_t *sec, uint32_t *usec) { } #endif +extern "C" CDECL void +nano_time(rust_task *task, uint64_t *ns) { + timer t; + *ns = t.nano_time(); +} + /** * Preallocates the exact number of bytes in the given interior vector. */ |
