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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user