summaryrefslogtreecommitdiff
path: root/storage/maria/lockman.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/maria/lockman.c')
-rw-r--r--storage/maria/lockman.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/maria/lockman.c b/storage/maria/lockman.c
index d6d4dcd44e6..459ee5d8ae2 100644
--- a/storage/maria/lockman.c
+++ b/storage/maria/lockman.c
@@ -690,12 +690,12 @@ enum lockman_getlock_result lockman_getlock(LOCKMAN *lm, LOCK_OWNER *lo,
}
/* yuck. waiting */
- deadline= my_getsystime() + lm->lock_timeout * 10000;
- set_timespec_nsec(timeout,lm->lock_timeout * 1000000);
+ deadline= my_hrtime().val*1000 + lm->lock_timeout * 1000000;
+ set_timespec_time_nsec(timeout, deadline);
do
{
pthread_cond_timedwait(wait_for_lo->cond, wait_for_lo->mutex, &timeout);
- } while (!DELETED(blocker->link) && my_getsystime() < deadline);
+ } while (!DELETED(blocker->link) && my_hrtime().val < deadline/1000);
pthread_mutex_unlock(wait_for_lo->mutex);
lf_rwlock_by_pins(pins);
if (!DELETED(blocker->link))