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:
parent
dad2455a03
commit
cabe6f1d65
3 changed files with 10 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue