diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-28 14:05:07 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-28 14:05:07 +0000 |
commit | 61c5c2e623140f0ca246cf7de3bc9ef861b220d5 (patch) | |
tree | e7fcb1b103a3f2d5d55481a8ce92b687b6aa8200 /eval.c | |
parent | 41a3d1429faece3e61b3779b482441d505128c2e (diff) |
* eval.c (get_ts): use readtime clock. [ruby-dev:38354]
* eval.c (rb_thread_stop_timer): clear thread_init while locking.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@23305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -12370,8 +12370,8 @@ get_ts(struct timespec *to, long ns) { struct timeval tv; -#ifdef CLOCK_MONOTONIC - if (clock_gettime(CLOCK_MONOTONIC, to) != 0) +#ifdef CLOCK_REALTIME + if (clock_gettime(CLOCK_REALTIME, to) != 0) #endif { gettimeofday(&tv, NULL); @@ -12452,9 +12452,9 @@ rb_thread_stop_timer() if (!thread_init) return; safe_mutex_lock(&time_thread.lock); pthread_cond_signal(&time_thread.cond); + thread_init = 0; pthread_cleanup_pop(1); pthread_join(time_thread.thread, NULL); - thread_init = 0; } #elif defined(HAVE_SETITIMER) static void |