renaming proc_time.{utime,stime} to proc_time.{user,sys}

'utime' and 'stime' are common within system structures, but with lots of
other stuff in the structure unrelated to time.  having 'time' in both the
structure/class name and the field at the sigar level is just lame.
This commit is contained in:
Doug MacEachern committed 2004-08-21 00:13:13 +00:00
1 parent 641253b359
commit 606275fc36
16 files changed
+46 -30

No files matched your search

+2 -2
View File
@@ -965,8 +965,8 @@ int sigar_proc_time_get(sigar_t *sigar, sigar_pid_t pid,
proctime->start_time = pinfo->pi_start;
proctime->start_time *= 1000; /* convert to ms */
proctime->utime = pinfo->pi_utime;
proctime->stime = pinfo->pi_stime;
proctime->user = pinfo->pi_utime;
proctime->sys = pinfo->pi_stime;
return SIGAR_OK;
}
+2 -2
View File
@@ -420,8 +420,8 @@ static int get_proc_times(sigar_pid_t pid, sigar_proc_time_t *time)
time_value_add(&utime, &tti.user_time);
time_value_add(&stime, &tti.system_time);
time->utime = utime.seconds;
time->stime = stime.seconds;
time->user = utime.seconds;
time->sys = stime.seconds;
return SIGAR_OK;
}
+2 -2
View File
@@ -295,8 +295,8 @@ int sigar_proc_time_get(sigar_t *sigar, sigar_pid_t pid,
proctime->start_time = pinfo->pst_start;
proctime->start_time *= 1000;
proctime->utime = pinfo->pst_utime;
proctime->stime = pinfo->pst_stime;
proctime->user = pinfo->pst_utime;
proctime->sys = pinfo->pst_stime;
return SIGAR_OK;
}
+2 -2
View File
@@ -637,8 +637,8 @@ int sigar_proc_time_get(sigar_t *sigar, sigar_pid_t pid,
return status;
}
proctime->utime = pstat->utime;
proctime->stime = pstat->stime;
proctime->user = pstat->utime;
proctime->sys = pstat->stime;
proctime->start_time = pstat->start_time;
return SIGAR_OK;
+2 -2
View File
@@ -582,8 +582,8 @@ int sigar_proc_time_get(sigar_t *sigar, sigar_pid_t pid,
proctime->start_time = usage.pr_create.tv_sec + sigar->boot_time;
proctime->start_time *= 1000;
proctime->utime = PRTIME_2SIGAR(usage.pr_utime);
proctime->stime = PRTIME_2SIGAR(usage.pr_stime);
proctime->user = PRTIME_2SIGAR(usage.pr_utime);
proctime->sys = PRTIME_2SIGAR(usage.pr_stime);
return SIGAR_OK;
}
+2 -2
View File
@@ -119,8 +119,8 @@ int sigar_proc_time_get(sigar_t *sigar, sigar_pid_t pid,
sigar_proc_time_t *proctime)
{
proctime->start_time = -1;
proctime->utime = -1;
proctime->stime = -1;
proctime->user = -1;
proctime->sys = -1;
return SIGAR_OK;
}
+2 -2
View File
@@ -645,8 +645,8 @@ SIGAR_DECLARE(int) sigar_proc_time_get(sigar_t *sigar, sigar_pid_t pid,
proctime->start_time = 0;
}
proctime->utime = FILETIME2SEC(user_time);
proctime->stime = FILETIME2SEC(system_time);
proctime->user = FILETIME2SEC(user_time);
proctime->sys = FILETIME2SEC(system_time);
return SIGAR_OK;
}