mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 10:35:10 +00:00
Use seconds instead of centiseconds as unit for $pid_time_kernelmode, $pid_time_usermode and $pid_time
This commit is contained in:
parent
7b05f78de8
commit
84d6095c40
@ -2681,7 +2681,7 @@
|
||||
</command>
|
||||
<option>pid</option>
|
||||
</term>
|
||||
<listitem>Amount of time that the process has been scheduled in user mode
|
||||
<listitem>Amount of time that the process has been scheduled in user mode in seconds
|
||||
<para /></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
@ -2691,7 +2691,7 @@
|
||||
</command>
|
||||
<option>pid</option>
|
||||
</term>
|
||||
<listitem>Amount of time that the process has been scheduled in user mode
|
||||
<listitem>Amount of time that the process has been scheduled in user mode in seconds
|
||||
<para /></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
|
@ -478,7 +478,7 @@ void print_pid_time_kernelmode(struct text_object *obj, char *p, int p_max_size)
|
||||
buf = readfile(obj->data.s, &bytes_read, 1);
|
||||
if(buf != NULL) {
|
||||
sscanf(buf, "%*d %*s %*c %*d %*d %*d %*d %*d %*u %*u %*u %*u %*u %lu", &umtime);
|
||||
snprintf(p, p_max_size, "%lu", umtime);
|
||||
snprintf(p, p_max_size, "%.2f", (float) umtime / 100);
|
||||
free(buf);
|
||||
}
|
||||
}
|
||||
@ -494,7 +494,7 @@ void print_pid_time_usermode(struct text_object *obj, char *p, int p_max_size) {
|
||||
buf = readfile(obj->data.s, &bytes_read, 1);
|
||||
if(buf != NULL) {
|
||||
sscanf(buf, "%*d %*s %*c %*d %*d %*d %*d %*d %*u %*u %*u %*u %*u %*u %lu", &kmtime);
|
||||
snprintf(p, p_max_size, "%lu", kmtime);
|
||||
snprintf(p, p_max_size, "%.2f", (float) kmtime / 100);
|
||||
free(buf);
|
||||
}
|
||||
}
|
||||
@ -510,7 +510,7 @@ void print_pid_time(struct text_object *obj, char *p, int p_max_size) {
|
||||
buf = readfile(obj->data.s, &bytes_read, 1);
|
||||
if(buf != NULL) {
|
||||
sscanf(buf, "%*d %*s %*c %*d %*d %*d %*d %*d %*u %*u %*u %*u %*u %lu %lu", &umtime, &kmtime);
|
||||
snprintf(p, p_max_size, "%lu", umtime + kmtime);
|
||||
snprintf(p, p_max_size, "%.2f", (float) (umtime + kmtime) / 100);
|
||||
free(buf);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user