From f4f88de5465218182f5e07a65699af9c5db149a9 Mon Sep 17 00:00:00 2001 From: "David G. Holm" Date: Thu, 6 Dec 2001 02:24:12 +0000 Subject: [PATCH] See ChangeLog entry 2001-12-05 21:20 UTC-0500 David G. Holm --- harbour/ChangeLog | 6 ++++++ harbour/source/rtl/seconds.c | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 79e3b0cb83..0286eaad02 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,8 @@ +2001-12-05 21:20 UTC-0500 David G. Holm + + * source/rtl/seconds.c + ! Bug fix for FreeBSD 4.4 port, which has microsecond time. + 2001-12-05 20:00 UTC-0500 David G. Holm * source/rtl/seconds.c @@ -2655,6 +2660,7 @@ + * source/pp/pragma.c * contrib/dot/pp_harb.ch * tests/inline_c.prg diff --git a/harbour/source/rtl/seconds.c b/harbour/source/rtl/seconds.c index 8d533779af..1d520680ef 100644 --- a/harbour/source/rtl/seconds.c +++ b/harbour/source/rtl/seconds.c @@ -82,7 +82,7 @@ double hb_dateSeconds( void ) #if defined(HB_OS_BSD) gettimeofday( &tv, &tz ); seconds = tv.tv_sec; - fraction = tv.tv_usec; + fraction = tv.tv_usec / 1000U; #else ftime( &tb ); seconds = tb.time; @@ -94,7 +94,7 @@ double hb_dateSeconds( void ) return ( oTime->tm_hour * 3600 ) + ( oTime->tm_min * 60 ) + oTime->tm_sec + - ( ( double ) fraction / 1000 ); + ( ( double ) fraction / 1000.0 ); } HB_FUNC( SECONDS ) @@ -115,3 +115,7 @@ HB_FUNC( HB_CLOCKS2SECS ) + + + +