mirror of
https://github.com/libretro/pcsx2.git
synced 2024-12-25 19:25:43 +00:00
gsdx:linux: Use clock_gettime instead of ftime
ftime is obsolete and not present in recent POSIX specifications.
This commit is contained in:
parent
da2046e90e
commit
57cdf0bf16
@ -1499,16 +1499,13 @@ EXPORT_C GSBenchmark(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow
|
|||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
|
||||||
#include <sys/time.h>
|
|
||||||
#include <sys/timeb.h> // ftime(), struct timeb
|
|
||||||
#include "GSLzma.h"
|
#include "GSLzma.h"
|
||||||
|
|
||||||
inline unsigned long timeGetTime()
|
inline unsigned long timeGetTime()
|
||||||
{
|
{
|
||||||
timeb t;
|
struct timespec t;
|
||||||
ftime(&t);
|
clock_gettime(CLOCK_REALTIME, &t);
|
||||||
|
return (unsigned long)(t.tv_sec*1000 + t.tv_nsec/1000000);
|
||||||
return (unsigned long)(t.time*1000 + t.millitm);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note
|
// Note
|
||||||
|
Loading…
Reference in New Issue
Block a user