From f07d02c3a0fc7ff76ce3d429ed78f3ab8a91e5db Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 28 Jan 2011 10:03:57 +0000 Subject: [PATCH] 2011-01-28 11:01 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg + Changed to use hb_milliSeconds() to measure build time when using -debugtime option. This will now work precisely for builds taking more than 1 day. --- harbour/ChangeLog | 6 ++++++ harbour/utils/hbmk2/hbmk2.prg | 7 ++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 39022a24f7..7bea63d7e4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2011-01-28 11:01 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * utils/hbmk2/hbmk2.prg + + Changed to use hb_milliSeconds() to measure build time + when using -debugtime option. This will now work precisely + for builds taking more than 1 day. + 2011-01-28 01:35 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg * Cleaned up Harbour build specific information in generated diff --git a/harbour/utils/hbmk2/hbmk2.prg b/harbour/utils/hbmk2/hbmk2.prg index d243356df2..6a33d4885e 100644 --- a/harbour/utils/hbmk2/hbmk2.prg +++ b/harbour/utils/hbmk2/hbmk2.prg @@ -901,7 +901,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) LOCAL aThreads LOCAL thread - LOCAL nStart := Seconds() + LOCAL nStart := hb_milliSeconds() LOCAL lDoSupportDetection LOCAL lDeleteWorkDir := .F. @@ -6232,7 +6232,7 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel ) PlugIn_Execute_All( hbmk, "post_all" ) IF hbmk[ _HBMK_lDEBUGTIME ] - hbmk_OutStd( hbmk, hb_StrFormat( I_( "Running time: %1$ss" ), hb_ntos( TimeElapsed( nStart, Seconds() ) ) ) ) + hbmk_OutStd( hbmk, hb_StrFormat( I_( "Running time: %1$ss" ), hb_ntos( Round( ( hb_milliSeconds() - nStart ) / 1000, 1 ) ) ) ) ENDIF IF ! lSkipBuild .AND. hbmk[ _HBMK_lBEEP ] @@ -9704,9 +9704,6 @@ STATIC FUNCTION MacroGet( hbmk, cMacro, cFileName ) RETURN cMacro -STATIC FUNCTION TimeElapsed( nStartSec, nEndSec ) - RETURN Round( ( nEndSec - iif( nEndSec < nStartSec, nStartSec - 86399, nStartSec ) ), 1 ) - STATIC FUNCTION IsValidHarbourID( cName ) LOCAL c IF HB_ISFIRSTIDCHAR( Left( cName, 1 ) )