summaryrefslogtreecommitdiff
path: root/runtime/exec_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/exec_utils.h')
-rw-r--r--runtime/exec_utils.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/exec_utils.h b/runtime/exec_utils.h
index b83722fd62..e09f285961 100644
--- a/runtime/exec_utils.h
+++ b/runtime/exec_utils.h
@@ -19,7 +19,9 @@
#include <time.h>
+#include <cstdint>
#include <functional>
+#include <optional>
#include <string>
#include <vector>
@@ -29,10 +31,10 @@ namespace art {
struct ProcessStat {
// The total wall time, in milliseconds, that the process spent, or 0 if failed to get the value.
- int wall_time_ms = 0;
+ int64_t wall_time_ms = 0;
// The total CPU time, in milliseconds, that the process and any waited-for children spent, or 0
// if failed to get the value.
- int cpu_time_ms = 0;
+ int64_t cpu_time_ms = 0;
};
struct ExecCallbacks {
@@ -105,7 +107,7 @@ class ExecUtils {
// Returns the content of `/proc/<pid>/stat`, or an empty string if failed.
virtual std::string GetProcStat(pid_t pid) const;
- virtual int64_t GetUptimeMs() const;
+ virtual std::optional<int64_t> GetUptimeMs(std::string* error_msg) const;
virtual int64_t GetTicksPerSec() const;