See ChangeLog entry 2001-12-05 20:00 UTC-0500 David G. Holm <dholm@jsd-llc.com>

This commit is contained in:
David G. Holm
2001-12-06 01:03:13 +00:00
parent db10fd6995
commit f12479d03a
2 changed files with 21 additions and 8 deletions

View File

@@ -1,3 +1,8 @@
2001-12-05 20:00 UTC-0500 David G. Holm <dholm@jsd-llc.com>
* source/rtl/seconds.c
! Bug fix for FreeBSD 4.4 port.
2001-12-05 16:00 UTC-0500 David G. Holm <dholm@jsd-llc.com>
* doc/gmake.txt

View File

@@ -68,27 +68,33 @@ double hb_dateSeconds( void )
#define ftime _ftime
#endif
#if defined(HB_OS_BSD)
struct timeval oTime;
struct timezone oZone;
struct timeval tv;
struct timezone tz;
#else
struct timeb tb;
struct tm * oTime;
#endif
time_t seconds;
time_t fraction;
struct tm * oTime;
HB_TRACE(HB_TR_DEBUG, ("hb_dateSeconds()"));
#if defined(HB_OS_BSD)
gettimeofday( &oTime, &oZone );
return ( ( double ) oTime.tv_sec + ( double ) oTime.tv_usec / 1000.0 );
gettimeofday( &tv, &tz );
seconds = tv.tv_sec;
fraction = tv.tv_usec;
#else
ftime( &tb );
oTime = localtime( &tb.time );
seconds = tb.time;
fraction = tb.millitm;
#endif
oTime = localtime( &seconds );
return ( oTime->tm_hour * 3600 ) +
( oTime->tm_min * 60 ) +
oTime->tm_sec +
( ( double ) tb.millitm / 1000 );
#endif
( ( double ) fraction / 1000 );
}
HB_FUNC( SECONDS )
@@ -107,3 +113,5 @@ HB_FUNC( HB_CLOCKS2SECS )