summaryrefslogtreecommitdiff
path: root/mjit.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-16 23:22:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-16 23:22:42 +0000
commitb701946418aa72eb32587acc71b4479e084ae1be (patch)
treef09b984459b8e5f4a04e9e1211b66515cbf2232f /mjit.c
parent1ae9fad62d9aded3016a879ecbab0041fea29724 (diff)
mjit.c: measure time more precisely
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.c')
-rw-r--r--mjit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mjit.c b/mjit.c
index 571f616fe6..3b7714306b 100644
--- a/mjit.c
+++ b/mjit.c
@@ -219,6 +219,10 @@ static char *libruby_pathflag;
static void remove_file(const char *filename);
/* Return time in milliseconds as a double. */
+#ifdef __APPLE__
+double ruby_real_ms_time(void);
+#define real_ms_time() ruby_real_ms_time()
+#else
static double
real_ms_time(void)
{
@@ -239,6 +243,7 @@ real_ms_time(void)
return tv.tv_usec / 1000.0 + tv.tv_sec * 1000.0;
#endif
}
+#endif
/* Make and return copy of STR in the heap. */
#define get_string ruby_strdup