summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorEric Herman <eric@freesa.org>2017-06-08 12:27:16 +0200
committerSergey Vojtovich <svoj@mariadb.org>2017-06-13 12:50:31 +0400
commit1a873fb865622819c11f33fa73d6971bfa27ce14 (patch)
treeadf8bc635412b41b37412f0ee34f29c6f34ac882 /client
parenteede812f059f06a3b49b3de92cad631b1f478a7c (diff)
downloadmariadb-git-1a873fb865622819c11f33fa73d6971bfa27ce14.tar.gz
replace my_timer_microseconds with microsecond_interval_timer
As svoj points out, my_timer_microseconds uses gettimeofday which is affected by "discontinuous jumps in the system time", according to man. This patch changes to use microsecond_interval_timer which is "not perfect, but is less affected by these jumps", and also does not require an include of my_rdtsc.h header. https://github.com/MariaDB/server/pull/332#discussion_r114708923
Diffstat (limited to 'client')
-rw-r--r--client/mysql.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index bc3d6963052..6669f9668db 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -34,7 +34,6 @@
#include <m_ctype.h>
#include <stdarg.h>
#include <my_dir.h>
-#include <my_rdtsc.h>
#ifndef __GNU_LIBRARY__
#define __GNU_LIBRARY__ // Skip warnings in getopt.h
#endif
@@ -5035,7 +5034,7 @@ void tee_putc(int c, FILE *file)
static ulonglong start_timer(void)
{
- return my_timer_microseconds();
+ return microsecond_interval_timer();
}