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