Add code to try to catch gettimeofday bug on linux where 0xffffffff is returned

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11149 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2012-04-25 18:46:31 +00:00
parent b400320745
commit 6e81376db3

View File

@@ -68,7 +68,10 @@ public:
return t;
#else
struct timeval tv;
gettimeofday(&tv, NULL);
if (gettimeofday(&tv, NULL) != 0)
{
throw std::runtime_error("gettimeofday failed");
}
return tv.tv_sec;
#endif
}; // getTimeSinceEpoch