uptime = (uint64_t)time(NULL) - (uint64_t)sys.uptime;
procstart = get_reaper_start_time_in_sec(pid);
- return uptime - procstart;
+ return uptime + procstart;
}
#define CPUALL_MAX_SIZE (BUF_RESERVE_SIZE / 2)
continue;
if (sscanf(line, "cpu%9[^ ]", cpu_char) != 1) {
/* not a ^cpuN line containing a number N, just print it */
- if (strncmp(line, "btime", 5) == 0)
- l = snprintf(cache, cache_size, "btime %"PRIu64"\n", get_reaper_btime(fc->pid));
- else
- l = snprintf(cache, cache_size, "%s", line);
+ l = snprintf(cache, cache_size, "%s", line);
if (l < 0) {
perror("Error writing to cache");
rv = 0;