1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

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:
Eric Herman
2017-06-08 12:27:16 +02:00
committed by Sergey Vojtovich
parent eede812f05
commit 1a873fb865

View File

@@ -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();
}