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..ff687885b5483ec2126d451481ca867928c4e4f1 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,23 @@ 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. |
+ 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. |
+ 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(); |