| 30 | } |
| 31 | |
| 32 | static time_t GetStartTime() |
| 33 | { |
| 34 | int hz = sysconf(_SC_CLK_TCK); |
| 35 | double uptime; |
| 36 | if (!StringToNumber(ReadField("/proc/uptime", 0), &uptime)) |
| 37 | return -1; |
| 38 | double start_time; |
| 39 | if (!StringToNumber(ReadField("/proc/self/stat", 21), &start_time)) |
| 40 | return -1; |
| 41 | |
| 42 | return static_cast<time_t>(time(NULL) - uptime + start_time / hz); |
| 43 | } |
| 44 | |
| 45 | pid_t ThisProcess::GetId() |
| 46 | { |
nothing calls this directly
no test coverage detected