Permalink
Browse files

darwin: don't use deprecated AbsoluteToNanoseconds

  • Loading branch information...
1 parent be597ba commit 9c7ae2e7a334d48909f5f6cfd873db968431a4d5 @bnoordhuis bnoordhuis committed Nov 2, 2012
Showing with 2 additions and 12 deletions.
  1. +2 −12 src/unix/darwin.c
View
@@ -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;

0 comments on commit 9c7ae2e

Please sign in to comment.