From bc94ad8eb49a67b1202a56f7bb28d8ea605a0b29 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 3 Feb 2016 01:26:03 +0300 Subject: Add to system information also information about clock function. I think issues with stuck skills delay/cooldown related to timers/clock. This change allow to see with what clock functions issue can be reproduced. --- src/common/sysinfo.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/common/sysinfo.c') diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index 7cc4cd16a..95f423ff7 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -38,6 +38,7 @@ #ifdef WIN32 # include #else +# include // time constants # include #endif @@ -1052,6 +1053,19 @@ void sysinfo_final(void) { sysinfo->p->vcstype_name = NULL; } +static const char *sysinfo_time(void) +{ +#if defined(WIN32) + return "ticks count"; +#elif defined(ENABLE_RDTSC) + return "rdtsc"; +#elif defined(HAVE_MONOTONIC_CLOCK) + return "monotonic clock"; +#else + return "time of day"; +#endif +} + /** * Interface default values initialization. */ @@ -1072,6 +1086,7 @@ void sysinfo_defaults(void) { sysinfo->is64bit = sysinfo_is64bit; sysinfo->compiler = sysinfo_compiler; sysinfo->cflags = sysinfo_cflags; + sysinfo->time = sysinfo_time; sysinfo->vcstype = sysinfo_vcstype; sysinfo->vcstypeid = sysinfo_vcstypeid; sysinfo->vcsrevision_src = sysinfo_vcsrevision_src; -- cgit v1.2.3-60-g2f50