aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-03-02 08:27:20 +0000
committerqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-03-02 08:27:20 +0000
commit04548babac02a1be6b304a0710aff80a68996658 (patch)
tree9ffdddb146cf8de96415dd9804106214be6d1f7b /src
parentSupport for .raSearch in the x86 stackwalker (diff)
downloadbreakpad-04548babac02a1be6b304a0710aff80a68996658.tar.xz
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
Diffstat (limited to 'src')
-rw-r--r--src/client/ios/Breakpad.h12
-rw-r--r--src/client/mac/Framework/Breakpad.h12
-rw-r--r--src/client/mac/crash_generation/ConfigFile.mm4
3 files changed, 17 insertions, 11 deletions
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<unsigned long long int>(processUptime) * 1000);
if (!AppendConfigString(BREAKPAD_PROCESS_UP_TIME, processUptimeString))
return false;
}