From: divverent Date: Wed, 24 Jul 2013 11:44:30 +0000 (+0000) Subject: make clock_gettime default (since 2.6.28 it is NTP-adjusted) X-Git-Tag: xonotic-v0.8.0~96^2~63 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1a700cf9b44c8561c251534f14ec5959e5987f33;p=xonotic%2Fdarkplaces.git make clock_gettime default (since 2.6.28 it is NTP-adjusted) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11977 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sys_shared.c b/sys_shared.c index 970d9204..03c05985 100644 --- a/sys_shared.c +++ b/sys_shared.c @@ -271,7 +271,7 @@ static cvar_t sys_usesdldelay = {CVAR_SAVE, "sys_usesdldelay", "0", "use SDL_Del static cvar_t sys_usequeryperformancecounter = {CVAR_SAVE, "sys_usequeryperformancecounter", "0", "use windows QueryPerformanceCounter timer (which has issues on multicore/multiprocessor machines and processors which are designed to conserve power) for timing rather than timeGetTime function (which has issues on some motherboards)"}; #endif #if HAVE_CLOCKGETTIME -static cvar_t sys_useclockgettime = {CVAR_SAVE, "sys_useclockgettime", "0", "use POSIX clock_gettime function (which has issues if the system clock speed is far off, as it can't get fixed by NTP) for timing rather than gettimeofday (which has issues if the system time is stepped by ntpdate, or apparently on some Xen installations)"}; +static cvar_t sys_useclockgettime = {CVAR_SAVE, "sys_useclockgettime", "1", "use POSIX clock_gettime function (not adjusted by NTP on some older Linux kernels) for timing rather than gettimeofday (which has issues if the system time is stepped by ntpdate, or apparently on some Xen installations)"}; #endif static double benchmark_time; // actually always contains an integer amount of milliseconds, will eventually "overflow"