darwin: don't use deprecated AbsoluteToNanoseconds
This commit is contained in:
parent
be597ba625
commit
9c7ae2e7a3
@ -173,9 +173,7 @@ void uv__cf_loop_signal(uv_loop_t* loop, cf_loop_signal_cb cb, void* arg) {
|
||||
}
|
||||
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
/* see: http://developer.apple.com/library/mac/#qa/qa1398/_index.html */
|
||||
uint64_t uv_hrtime() {
|
||||
uint64_t uv_hrtime(void) {
|
||||
uint64_t time;
|
||||
uint64_t enano;
|
||||
static mach_timebase_info_data_t sTimebaseInfo;
|
||||
@ -190,15 +188,7 @@ uint64_t uv_hrtime() {
|
||||
|
||||
return enano;
|
||||
}
|
||||
#else
|
||||
uint64_t uv_hrtime() {
|
||||
uint64_t time;
|
||||
Nanoseconds enano;
|
||||
time = mach_absolute_time();
|
||||
enano = AbsoluteToNanoseconds(*(AbsoluteTime *)&time);
|
||||
return (*(uint64_t *)&enano);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
int uv_exepath(char* buffer, size_t* size) {
|
||||
uint32_t usize;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user