[Commits] SDL: Fixed timestamp issue.
libsdl.org revision control
commits-owner at libsdl.org
Mon Aug 29 10:21:16 PDT 2011
details: http://hg.libsdl.org/SDL/rev/66dc563da07e
changeset: 5843:66dc563da07e
user: Markus Kauppila <markus.kauppila at gmail.com>
date: Sun Aug 28 20:08:36 2011 +0300
description:
Fixed timestamp issue.
diffstat:
test/test-automation/src/runner/runner.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (42 lines):
diff -r 2ea6b78e504f -r 66dc563da07e test/test-automation/src/runner/runner.c
--- a/test/test-automation/src/runner/runner.c Sun Aug 28 20:01:25 2011 +0300
+++ b/test/test-automation/src/runner/runner.c Sun Aug 28 20:08:36 2011 +0300
@@ -969,7 +969,7 @@
*/
LoggerData *
SetUpLogger(const int log_stdout_enabled, const int xml_enabled, const int xsl_enabled,
- const int custom_xsl_enabled, const char *defaultXslSheet)
+ const int custom_xsl_enabled, const char *defaultXslSheet, const time_t timestamp)
{
LoggerData *loggerData = SDL_malloc(sizeof(LoggerData));
if(loggerData == NULL) {
@@ -992,7 +992,7 @@
unsigned int mode = S_IRWXU | S_IRGRP | S_ISUID;
mkdir(log_directory, mode);
- char *timeString = TimestampToStringWithFormat(time(0), "%Y%m%d_%H:%M:%S");
+ char *timeString = TimestampToStringWithFormat(timestamp, "%Y%m%d_%H:%M:%S");
/* Combine and create directory for log file */
@@ -1376,8 +1376,10 @@
}
}
+ const time_t startTimestamp = time(0);
+
LoggerData *loggerData = SetUpLogger(log_stdout_enabled, xml_enabled,
- xsl_enabled, custom_xsl_enabled, defaultXSLStylesheet);
+ xsl_enabled, custom_xsl_enabled, defaultXSLStylesheet, startTimestamp);
if(loggerData == NULL) {
printf("Failed to create a logger.\n");
return 2;
@@ -1392,7 +1394,7 @@
fflush(stdout);
}
- RunStarted(argc, argv, runSeed, time(0), loggerData);
+ RunStarted(argc, argv, runSeed, startTimestamp, loggerData);
// logger data is no longer used
SDL_free(loggerData->filename);
More information about the commits
mailing list