Index: procinfo-18/routines.c
===================================================================
--- procinfo-18.orig/routines.c
+++ procinfo-18/routines.c
@@ -389,9 +389,9 @@ hms (unsigned long t)
 {
     unsigned int d, h, m, s;
     static char buf[22];
 
-    t = (t*100) / HZ;
+    t = (t*100ULL) / HZ;
     d = (unsigned int) (t / 8640000);
     t = t - (unsigned long) (d * 8640000);
     h = (unsigned int) (t / 360000);
     t = t - (unsigned long) (h * 360000);
@@ -412,8 +412,9 @@ perc (unsigned long i, unsigned long t, 
 {
     unsigned int v;
     static char buf[16];
 
+    t = (t*100ULL) / HZ;
     if ((signed long) i == -1 || t == 0)
 	return "---.-%";
 
     v = (unsigned int) (i < 1000000 ?
Index: procinfo-18/procinfo.c
===================================================================
--- procinfo-18.orig/procinfo.c
+++ procinfo-18/procinfo.c
@@ -82,8 +82,24 @@ float rate = 1.0;		/* per interval or pe
 
 struct info new, old, base;
 struct utsname ut;
 
+unsigned long hz;
+
+void get_HZ(void)
+{
+    FILE* hzfp;
+
+    if (! access (PROC_DIR "sys/kernel/HZ", R_OK)) {
+	hzfp = myfopen (PROC_DIR "sys/kernel/HZ");
+	fscanf (hzfp, "%li", &hz);
+	fclose (hzfp);
+    } else if (linux_version_code >= 0x20560)
+	    hz = 1000;
+    else
+	    hz = 100;
+}
+        	
 
 static void
 first_page (long sl)
 {
@@ -702,8 +718,9 @@ main (int ac, char **av)
     uname(&ut);
     linux_version_code = (atol(strtok(ut.release, ".")) * 0x10000) +
 	(atol(strtok(NULL, ".")) * 0x100) +
 	atol(strtok(NULL, ""));
+    get_HZ();
 
     while ((getoptopt = getopt (ac, av, "sfn:madirDSF:bChv")) != EOF) {
 	switch (getoptopt) {
 	case 'n':
Index: procinfo-18/procinfo.h
===================================================================
--- procinfo-18.orig/procinfo.h
+++ procinfo-18/procinfo.h
@@ -26,8 +26,10 @@
 #endif
 
 #define ISSTR(s)	(!strcmp(s, type))
 
+extern unsigned long hz;
+
 #if 0
 #define VAL		(strtoul(strtok(NULL, "\t "), NULL, 10))
 #else
 static inline unsigned long find_val(void)
