Index: snapshot/win/process_reader_win.h |
diff --git a/snapshot/win/process_reader_win.h b/snapshot/win/process_reader_win.h |
index b570a5e82c6b27dfce2ba3649360f38dd48b576c..8862ce093aace6735670fdadfbd3096b6eabc903 100644 |
--- a/snapshot/win/process_reader_win.h |
+++ b/snapshot/win/process_reader_win.h |
@@ -15,6 +15,7 @@ |
#ifndef CRASHPAD_SNAPSHOT_WIN_PROCESS_READER_WIN_H_ |
#define CRASHPAD_SNAPSHOT_WIN_PROCESS_READER_WIN_H_ |
+#include <sys/time.h> |
#include <windows.h> |
#include "util/misc/initialization_state_dcheck.h" |
@@ -48,6 +49,26 @@ class ProcessReaderWin { |
bool ReadMemory(WinVMAddress at, WinVMSize num_bytes, void* into); |
+ //! \brief Determines the target process' start time. |
+ //! |
+ //! \param[out] start_time The time that the process started. |
+ //! |
+ //! \return `true` on success, `false` on failure, with a warning logged. On |
+ //! failure, \a start_time will be set to represent the epoch. |
Mark Mentovai
2015/05/04 21:29:23
It’s OK to leave start_time undefined as far as th
scottmg
2015/05/05 16:45:48
Done.
|
+ bool StartTime(timeval* start_time) const; |
+ |
+ //! \brief Determines the target process' execution time. |
+ //! |
+ //! \param[out] user_time The amount of time the process has executed code in |
+ //! user mode. |
+ //! \param[out] system_time The amount of time the process has executed code |
+ //! in kernel mode. |
+ //! |
+ //! \return `true` on success, `false` on failure, with a warning logged. On |
+ //! failure, \a user_time and \a system_time will be set to represent no |
+ //! time spent executing code in user or kernel mode. |
+ bool CPUTimes(timeval* user_time, timeval* system_time) const; |
+ |
//! \return The modules loaded in the process. The first element (at index |
//! `0`) corresponds to the main executable. |
const std::vector<ProcessInfo::Module>& Modules(); |