diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-05-19 19:05:35 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-05-19 19:05:35 +0200 |
commit | 03b33425e5a3de3fad070aa21e7fc7baf8104c81 (patch) | |
tree | 2cc6c9da412eab9a2176ded10bdb1ca7cbb295de /client | |
parent | 8ddcd0cda8e6e90a58e9ea64f0f3773ea0037f0b (diff) | |
download | mariadb-git-03b33425e5a3de3fad070aa21e7fc7baf8104c81.tar.gz |
many changes to my_getsystime.c:
* my_getsystime() is only an interval timer. Its value can beused for calculating
time intervals.
* renamed my_getsystime() to my_interval_timer(), to make the semantics
clearer and let the compiler catch wrong usages of my_getsystime()
(also future ones, that may come in merges).
* increased its granularity from 100ns to 1ns, old value was for UUID,
but as UUID can no longer use it directly there is no need to downgrade
the OS provided value
* fixed the UUID code to anchor the my_interval_timer() on the epoch, as
required by the UUID standard. That is, this was only needed by UUID,
and now I've moved it to UUID code from my_getsystime().
* fixed other wrong usages of my_getsystime() - e.g. in calculating
times for pthread_cond_timedwait. It was buggy and could've caused
long waits if OS clock would be changed.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqltest.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 98315ef6abe..7aaa479e879 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -8516,7 +8516,7 @@ void timer_output(void) ulonglong timer_now(void) { - return my_micro_time() / 1000; + return my_interval_timer() / 1000000; } |