Commit 2358ba63 authored by Reinhard Prix's avatar Reinhard Prix

CFSv2: use LogGetTimestamp() instead of XLALGetCPUTime() for timestamp info

- now that CPUtime is actually returned, the output of 'search started
  at' was seen to have erroneously used the CPU time output
- make LogGetTimestamp() visible from outside LogPrintf, which seems
  reasonable to me
- refs #5411
Original: 4d7ddb234b146114d403323cc5a0683b11f5e184
parent 1cd66f44
......@@ -73,7 +73,6 @@ static FILE *logFile = NULL;
/*---------- internal prototypes ----------*/
static FILE* LogFile(void);
static const char * LogGetTimestamp (void);
static const char * LogTimeToString(double t);
static const char *LogFormatLevel( LogLevel_t level );
......@@ -281,7 +280,7 @@ XLALGetCPUTime ( void )
/* returns static timestamps-string for 'now' */
static const char *
const char *
LogGetTimestamp (void)
{
return ( LogTimeToString ( XLALGetTimeOfDay() ) );
......
......@@ -75,6 +75,7 @@ int XLALfprintfGSLvector_int ( FILE *fp, const char *fmt, const gsl_vector_int *
REAL8 XLALGetTimeOfDay(void);
REAL8 XLALGetCPUTime ( void );
const char * LogGetTimestamp (void);
REAL8 XLALGetPeakHeapUsageMB ( void );
......
......@@ -1537,9 +1537,8 @@ XLALGetLogString ( const ConfigVariables *cfg )
XLAL_CHECK_NULL ( (logstr = XLALStringAppend ( logstr, buf )) != NULL, XLAL_EFUNC );
XLAL_CHECK_NULL ( (logstr = XLALStringAppend ( logstr, "%% Started search: " )) != NULL, XLAL_EFUNC );
time_t tp = GETTIME();
XLAL_CHECK_NULL ( (logstr = XLALStringAppend ( logstr, asctime( gmtime( &tp ) ))) != NULL, XLAL_EFUNC );
XLAL_CHECK_NULL ( (logstr = XLALStringAppend ( logstr, "%% Loaded SFTs: [ " )) != NULL, XLAL_EFUNC );
XLAL_CHECK_NULL ( (logstr = XLALStringAppend ( logstr, LogGetTimestamp() )) != NULL, XLAL_EFUNC );
XLAL_CHECK_NULL ( (logstr = XLALStringAppend ( logstr, "\n%% Loaded SFTs: [ " )) != NULL, XLAL_EFUNC );
UINT4 numDet = cfg->detectorIDs->length;
for ( UINT4 X=0; X < numDet; X ++ )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment