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
This commit is contained in:
parent
eede812f05
commit
1a873fb865
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user