Fix bug reported by Takis Psarogiannakopoulos: `start_time' are seconds

1999-07-29  Martin Baulig  <martin@home-of-linux.org>

	* proctime.c (glibtop_get_proc_time_p): Fix bug reported by
	Takis Psarogiannakopoulos: `start_time' are seconds since the
 	epoch as it is stated in the manual.
This commit is contained in:
Martin Baulig
1999-07-29 18:56:26 +00:00
committed by Martin Baulig
parent 60a6d0876e
commit 9bd351abae
4 changed files with 14 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
1999-07-29 Martin Baulig <martin@home-of-linux.org>
* proctime.c (glibtop_get_proc_time_p): Fix bug reported by
Takis Psarogiannakopoulos: `start_time' are seconds since the
epoch as it is stated in the manual.
Tue Jun 15 16:04:10 1999 Timur Bakeyev <mc@bat.ru> Tue Jun 15 16:04:10 1999 Timur Bakeyev <mc@bat.ru>
* procuid.c: A fix to a ommitted case, when nor NetBSD, nor * procuid.c: A fix to a ommitted case, when nor NetBSD, nor

View File

@@ -188,7 +188,7 @@ glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
buf->cutime = tv2sec (pstats.p_cru.ru_utime); buf->cutime = tv2sec (pstats.p_cru.ru_utime);
buf->cstime = tv2sec (pstats.p_cru.ru_stime); buf->cstime = tv2sec (pstats.p_cru.ru_stime);
buf->start_time = tv2sec (pstats.p_start); buf->start_time = (u_int64_t) pstats.p_start.tv_sec;
buf->flags |= _glibtop_sysdeps_proc_time_user; buf->flags |= _glibtop_sysdeps_proc_time_user;
#else #else

View File

@@ -1,3 +1,9 @@
1999-07-29 Martin Baulig <martin@home-of-linux.org>
* proctime.c (glibtop_get_proc_time_p): Fix bug reported by
Takis Psarogiannakopoulos: `start_time' are seconds since the
epoch as it is stated in the manual.
1999-07-16 Drazen Kacar <dave@srce.hr> 1999-07-16 Drazen Kacar <dave@srce.hr>
* proclist.c: Bug fix. All Solaris versions have RUID and * proclist.c: Bug fix. All Solaris versions have RUID and

View File

@@ -55,8 +55,7 @@ glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf,
if (glibtop_get_proc_data_usage_s (server, &prusage, pid)) if (glibtop_get_proc_data_usage_s (server, &prusage, pid))
return; return;
buf->start_time = prusage.pr_create.tv_sec * 1E+6 + buf->start_time = prusage.pr_create.tv_sec;
prusage.pr_create.tv_nsec / 1E+3;
buf->rtime = prusage.pr_rtime.tv_sec * 1E+6 + buf->rtime = prusage.pr_rtime.tv_sec * 1E+6 +
prusage.pr_rtime.tv_nsec / 1E+3; prusage.pr_rtime.tv_nsec / 1E+3;