adjust fix for BSD for time info from commit 2665a5d
This commit is contained in:
@@ -57,13 +57,15 @@ TimeInfo::~TimeInfo()
|
||||
|
||||
void TimeInfo::setCurrent(void)
|
||||
{
|
||||
#if defined (FC_OS_WIN32)
|
||||
_ftime( &timebuffer );
|
||||
#else
|
||||
#if defined (FC_OS_BSD)
|
||||
struct timeval t;
|
||||
gettimeofday(&t, NULL);
|
||||
timebuffer.time = t.tv_sec;
|
||||
timebuffer.millitm = t.tv_usec / 1000;
|
||||
#elif defined(FC_OS_WIN32)
|
||||
_ftime(&timebuffer);
|
||||
#else
|
||||
ftime(&timebuffer);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#if defined(FC_OS_WIN32)
|
||||
#include <sys/timeb.h>
|
||||
#else
|
||||
#if defined(FC_OS_BSD)
|
||||
#include <sys/time.h>
|
||||
#else
|
||||
#include <sys/timeb.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
|
||||
@@ -39,11 +39,11 @@
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
#if !defined(FC_OS_WIN32)
|
||||
#if defined(FC_OS_BSD)
|
||||
struct timeb
|
||||
{
|
||||
int64_t time;
|
||||
unsigned short millitm;
|
||||
int64_t time;
|
||||
unsigned short millitm;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user