summaryrefslogtreecommitdiff
path: root/unittest/mysys/thr_template.c
diff options
context:
space:
mode:
Diffstat (limited to 'unittest/mysys/thr_template.c')
-rw-r--r--unittest/mysys/thr_template.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/unittest/mysys/thr_template.c b/unittest/mysys/thr_template.c
index 1ac03e474fd..781bfbe4f9c 100644
--- a/unittest/mysys/thr_template.c
+++ b/unittest/mysys/thr_template.c
@@ -29,7 +29,7 @@ void do_tests();
void test_concurrently(const char *test, pthread_handler handler, int n, int m)
{
pthread_t t;
- ulonglong now= my_getsystime();
+ ulonglong now= my_interval_timer();
bad= 0;
@@ -47,8 +47,8 @@ void test_concurrently(const char *test, pthread_handler handler, int n, int m)
pthread_cond_wait(&cond, &mutex);
pthread_mutex_unlock(&mutex);
- now= my_getsystime()-now;
- ok(!bad, "tested %s in %g secs (%d)", test, ((double)now)/1e7, bad);
+ now= my_interval_timer() - now;
+ ok(!bad, "tested %s in %g secs (%d)", test, ((double)now)/1e9, bad);
}
int main(int argc __attribute__((unused)), char **argv)
@@ -82,7 +82,9 @@ int main(int argc __attribute__((unused)), char **argv)
workaround until we know why it crashes randomly on some machine
(BUG#22320).
*/
+#ifdef NOT_USED
sleep(2);
+#endif
pthread_mutex_destroy(&mutex);
pthread_cond_destroy(&cond);
pthread_attr_destroy(&thr_attr);