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)
|
||||
{
|
||||
#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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user