From 04548babac02a1be6b304a0710aff80a68996658 Mon Sep 17 00:00:00 2001 From: "qsr@chromium.org" Date: Fri, 2 Mar 2012 08:27:20 +0000 Subject: Send uptime as milliseconds for Mac and iOS. All other platform are sending uptime as milliseconds. Changing the implementation to do the same on Mac and iOS. Review URL: https://breakpad.appspot.com/355001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@928 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/ios/Breakpad.h | 12 +++++++----- src/client/mac/Framework/Breakpad.h | 12 +++++++----- src/client/mac/crash_generation/ConfigFile.mm | 4 +++- 3 files changed, 17 insertions(+), 11 deletions(-) (limited to 'src/client') diff --git a/src/client/ios/Breakpad.h b/src/client/ios/Breakpad.h index f1e19acf..c190385c 100644 --- a/src/client/ios/Breakpad.h +++ b/src/client/ios/Breakpad.h @@ -131,13 +131,15 @@ typedef bool (*BreakpadFilterCallback)(int exception_type, // completeness. They are calculated by Breakpad during initialization & // crash-dump generation, or entered in by the user. // -// BREAKPAD_PROCESS_START_TIME The time the process started. +// BREAKPAD_PROCESS_START_TIME The time, in seconds since the Epoch, the +// process started // -// BREAKPAD_PROCESS_CRASH_TIME The time the process crashed. +// BREAKPAD_PROCESS_CRASH_TIME The time, in seconds since the Epoch, the +// process crashed. // -// BREAKPAD_PROCESS_UP_TIME The total time the process has been -// running. This parameter is not set -// until the crash-dump-generation phase. +// BREAKPAD_PROCESS_UP_TIME The total time in milliseconds the process +// has been running. This parameter is not +// set until the crash-dump-generation phase. // // BREAKPAD_SERVER_PARAMETER_PREFIX This prefix is used by Breakpad // internally, because Breakpad uses diff --git a/src/client/mac/Framework/Breakpad.h b/src/client/mac/Framework/Breakpad.h index ab2854ed..dbc620eb 100644 --- a/src/client/mac/Framework/Breakpad.h +++ b/src/client/mac/Framework/Breakpad.h @@ -186,13 +186,15 @@ typedef bool (*BreakpadFilterCallback)(int exception_type, // completeness. They are calculated by Breakpad during initialization & // crash-dump generation, or entered in by the user. // -// BREAKPAD_PROCESS_START_TIME The time the process started. +// BREAKPAD_PROCESS_START_TIME The time, in seconds since the Epoch, the +// process started // -// BREAKPAD_PROCESS_CRASH_TIME The time the process crashed. +// BREAKPAD_PROCESS_CRASH_TIME The time, in seconds since the Epoch, the +// process crashed. // -// BREAKPAD_PROCESS_UP_TIME The total time the process has been -// running. This parameter is not set -// until the crash-dump-generation phase. +// BREAKPAD_PROCESS_UP_TIME The total time in milliseconds the process +// has been running. This parameter is not +// set until the crash-dump-generation phase. // // BREAKPAD_LOGFILE_KEY_PREFIX Used to find out which parameters in the // parameter dictionary correspond to log diff --git a/src/client/mac/crash_generation/ConfigFile.mm b/src/client/mac/crash_generation/ConfigFile.mm index b5e918df..ee2d9448 100644 --- a/src/client/mac/crash_generation/ConfigFile.mm +++ b/src/client/mac/crash_generation/ConfigFile.mm @@ -117,7 +117,9 @@ BOOL ConfigFile::AppendCrashTimeParameters(const char *processStartTimeString) { if (processStartTimeString) { time_t processStartTime = strtol(processStartTimeString, NULL, 10); time_t processUptime = tv.tv_sec - processStartTime; - sprintf(processUptimeString, "%zd", processUptime); + // Store the uptime in milliseconds. + sprintf(processUptimeString, "%llu", + static_cast(processUptime) * 1000); if (!AppendConfigString(BREAKPAD_PROCESS_UP_TIME, processUptimeString)) return false; } -- cgit v1.2.1