Commit 1a873fb8 authored by Eric Herman's avatar Eric Herman Committed by Sergey Vojtovich

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
parent eede812f
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <m_ctype.h> #include <m_ctype.h>
#include <stdarg.h> #include <stdarg.h>
#include <my_dir.h> #include <my_dir.h>
#include <my_rdtsc.h>
#ifndef __GNU_LIBRARY__ #ifndef __GNU_LIBRARY__
#define __GNU_LIBRARY__ // Skip warnings in getopt.h #define __GNU_LIBRARY__ // Skip warnings in getopt.h
#endif #endif
...@@ -5035,7 +5034,7 @@ void tee_putc(int c, FILE *file) ...@@ -5035,7 +5034,7 @@ void tee_putc(int c, FILE *file)
static ulonglong start_timer(void) static ulonglong start_timer(void)
{ {
return my_timer_microseconds(); return microsecond_interval_timer();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment