mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 19:23:50 +00:00
rt: rename nano_time() builtin to match time::precise_time_ns()
This commit is contained in:
parent
b73bc30858
commit
3d202d7eae
@ -5,7 +5,7 @@ Module: time
|
||||
#[abi = "cdecl"]
|
||||
native mod rustrt {
|
||||
fn get_time(&sec: u32, &usec: u32);
|
||||
fn nano_time(&ns: u64);
|
||||
fn precise_time_ns(&ns: u64);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -34,7 +34,7 @@ Function: precise_time_ns
|
||||
Returns the current value of a high-resolution performance counter
|
||||
in nanoseconds since an unspecified epoch.
|
||||
*/
|
||||
fn precise_time_ns() -> u64 { let ns = 0u64; rustrt::nano_time(ns); ret ns; }
|
||||
fn precise_time_ns() -> u64 { let ns = 0u64; rustrt::precise_time_ns(ns); ns }
|
||||
|
||||
/*
|
||||
Function: precise_time_s
|
||||
|
@ -420,7 +420,7 @@ get_time(uint32_t *sec, uint32_t *usec) {
|
||||
#endif
|
||||
|
||||
extern "C" CDECL void
|
||||
nano_time(uint64_t *ns) {
|
||||
precise_time_ns(uint64_t *ns) {
|
||||
timer t;
|
||||
*ns = t.time_ns();
|
||||
}
|
||||
|
@ -13,10 +13,10 @@ get_port_id
|
||||
get_task_id
|
||||
get_time
|
||||
last_os_error
|
||||
nano_time
|
||||
new_port
|
||||
new_task
|
||||
port_recv
|
||||
precise_time_ns
|
||||
rust_port_select
|
||||
rand_free
|
||||
rand_new
|
||||
|
Loading…
Reference in New Issue
Block a user