mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-01-22 16:31:08 +00:00
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
This commit is contained in:
parent
84a55c5a72
commit
04548babac
|
@ -131,13 +131,15 @@ typedef bool (*BreakpadFilterCallback)(int exception_type,
|
||||||
// completeness. They are calculated by Breakpad during initialization &
|
// completeness. They are calculated by Breakpad during initialization &
|
||||||
// crash-dump generation, or entered in by the user.
|
// 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
|
// BREAKPAD_PROCESS_UP_TIME The total time in milliseconds the process
|
||||||
// running. This parameter is not set
|
// has been running. This parameter is not
|
||||||
// until the crash-dump-generation phase.
|
// set until the crash-dump-generation phase.
|
||||||
//
|
//
|
||||||
// BREAKPAD_SERVER_PARAMETER_PREFIX This prefix is used by Breakpad
|
// BREAKPAD_SERVER_PARAMETER_PREFIX This prefix is used by Breakpad
|
||||||
// internally, because Breakpad uses
|
// internally, because Breakpad uses
|
||||||
|
|
|
@ -186,13 +186,15 @@ typedef bool (*BreakpadFilterCallback)(int exception_type,
|
||||||
// completeness. They are calculated by Breakpad during initialization &
|
// completeness. They are calculated by Breakpad during initialization &
|
||||||
// crash-dump generation, or entered in by the user.
|
// 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
|
// BREAKPAD_PROCESS_UP_TIME The total time in milliseconds the process
|
||||||
// running. This parameter is not set
|
// has been running. This parameter is not
|
||||||
// until the crash-dump-generation phase.
|
// set until the crash-dump-generation phase.
|
||||||
//
|
//
|
||||||
// BREAKPAD_LOGFILE_KEY_PREFIX Used to find out which parameters in the
|
// BREAKPAD_LOGFILE_KEY_PREFIX Used to find out which parameters in the
|
||||||
// parameter dictionary correspond to log
|
// parameter dictionary correspond to log
|
||||||
|
|
|
@ -117,7 +117,9 @@ BOOL ConfigFile::AppendCrashTimeParameters(const char *processStartTimeString) {
|
||||||
if (processStartTimeString) {
|
if (processStartTimeString) {
|
||||||
time_t processStartTime = strtol(processStartTimeString, NULL, 10);
|
time_t processStartTime = strtol(processStartTimeString, NULL, 10);
|
||||||
time_t processUptime = tv.tv_sec - processStartTime;
|
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))
|
if (!AppendConfigString(BREAKPAD_PROCESS_UP_TIME, processUptimeString))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue