Added a nanosecond timer to time.rs, support for some floating point casts, and a commandline-driven mode for pfib.rs

This commit is contained in:
Eric Holk
2011-06-28 17:58:44 -07:00
parent 441c7e0610
commit b4a145e60f
7 changed files with 95 additions and 33 deletions

View File

@@ -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.
*/