From 57cdf0bf1605a9f451cf4149aeb3e9c126cb9fab Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Fri, 13 May 2016 23:43:36 +0100 Subject: [PATCH] gsdx:linux: Use clock_gettime instead of ftime ftime is obsolete and not present in recent POSIX specifications. --- plugins/GSdx/GS.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index 7415fcaa0..f886c775a 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -1499,16 +1499,13 @@ EXPORT_C GSBenchmark(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow #ifdef __linux__ -#include -#include // ftime(), struct timeb #include "GSLzma.h" inline unsigned long timeGetTime() { - timeb t; - ftime(&t); - - return (unsigned long)(t.time*1000 + t.millitm); + struct timespec t; + clock_gettime(CLOCK_REALTIME, &t); + return (unsigned long)(t.tv_sec*1000 + t.tv_nsec/1000000); } // Note