1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

some fixes to make compiling on some bsd easier

This commit is contained in:
Perttu Ahola 2011-02-11 22:34:34 +02:00
parent dad2455a03
commit cabe6f1d65
3 changed files with 10 additions and 3 deletions

View file

@ -86,13 +86,20 @@ void initializePaths();
return GetTickCount();
}
#else // Posix
#include <sys/timeb.h>
#include <sys/time.h>
inline u32 getTimeMs()
{
struct timeval tv;
gettimeofday(&tv, NULL);
return tv.tv_sec * 1000 + tv.tv_usec / 1000;
}
/*#include <sys/timeb.h>
inline u32 getTimeMs()
{
struct timeb tb;
ftime(&tb);
return tb.time * 1000 + tb.millitm;
}
}*/
#endif
} // namespace porting