From 3b2af9593a1ef4311b0d1b2ed502acecb6222aad Mon Sep 17 00:00:00 2001 From: malc Date: Sun, 3 Mar 2013 21:37:20 +0400 Subject: [PATCH] Sample wall clock before idle time --- idlestat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idlestat.c b/idlestat.c index 3a54b6f..bf45482 100644 --- a/idlestat.c +++ b/idlestat.c @@ -64,12 +64,12 @@ int main (int argc, char **argv) int i; double s, e, d, *t; - s = now (); idlenow (fd, nprocs, prev); + s = now (); sleep (1); + idlenow (fd, nprocs, curr); e = now (); d = e - s; - idlenow (fd, nprocs, curr); for (i = 0; i < nprocs; ++i) { double di = curr[i] - prev[i]; -- 2.11.4.GIT