80 lines
2.4 KiB
Diff
80 lines
2.4 KiB
Diff
|
--- acct-6.3.2/sa.c 1998-03-10 17:54:28.000000000 +0000
|
||
|
+++ acct-6.3.2.1/sa.c 2004-03-08 22:05:57.000000000 +0000
|
||
|
@@ -233,7 +233,7 @@
|
||
|
"***other" category */
|
||
|
int always_yes = 0; /* nonzero means always answer yes to
|
||
|
a query */
|
||
|
-
|
||
|
+static unsigned int hzval;
|
||
|
|
||
|
/* prototypes */
|
||
|
|
||
|
@@ -266,6 +266,7 @@
|
||
|
{
|
||
|
int c;
|
||
|
|
||
|
+ hzval = sysconf(_SC_CLK_TCK);
|
||
|
program_name = argv[0];
|
||
|
|
||
|
/* Cache the page size of the machine for the PAGES_TO_KB macro */
|
||
|
@@ -551,7 +552,7 @@
|
||
|
|
||
|
if (debugging_enabled)
|
||
|
{
|
||
|
- fprintf (stddebug, "AHZ -> %d\n", AHZ);
|
||
|
+ fprintf (stddebug, "hzval -> %d\n", hzval);
|
||
|
fprintf (stddebug, "getpagesize() -> %d\n", getpagesize ());
|
||
|
fprintf (stddebug, "system_page_size == %.2f\n", system_page_size);
|
||
|
}
|
||
|
@@ -901,7 +902,7 @@
|
||
|
/* Christoph Badura <bad@flatlin.ka.sub.org> says:
|
||
|
*
|
||
|
* The k*sec statistic is computed as
|
||
|
- * ((ac_utime+ac_stime)*pages_to_kbytes(ac_mem))/AHZ. Of course you
|
||
|
+ * ((ac_utime+ac_stime)*pages_to_kbytes(ac_mem))/hzval. Of course you
|
||
|
* need to expand the comp_t values.
|
||
|
*
|
||
|
* PAGES_TO_KBYTES(x) simply divides x by (getpagesize()/1024). Of
|
||
|
@@ -1103,33 +1104,33 @@
|
||
|
{
|
||
|
#ifdef HAVE_ACUTIME
|
||
|
# ifdef ACUTIME_COMPT
|
||
|
- double ut = comp_t_2_double (rec->ac_utime) / (double) AHZ;
|
||
|
+ double ut = comp_t_2_double (rec->ac_utime) / (double) hzval;
|
||
|
# else
|
||
|
- double ut = (double) rec->ac_utime / (double) AHZ;
|
||
|
+ double ut = (double) rec->ac_utime / (double) hzval;
|
||
|
# endif
|
||
|
#endif
|
||
|
|
||
|
#ifdef HAVE_ACSTIME
|
||
|
# ifdef ACSTIME_COMPT
|
||
|
- double st = comp_t_2_double (rec->ac_stime) / (double) AHZ;
|
||
|
+ double st = comp_t_2_double (rec->ac_stime) / (double) hzval;
|
||
|
# else
|
||
|
- double st = (double) rec->ac_stime / (double) AHZ;
|
||
|
+ double st = (double) rec->ac_stime / (double) hzval;
|
||
|
# endif
|
||
|
#endif
|
||
|
|
||
|
#ifdef HAVE_ACETIME
|
||
|
# ifdef ACETIME_COMPT
|
||
|
- double et = comp_t_2_double (rec->ac_etime) / (double) AHZ;
|
||
|
+ double et = comp_t_2_double (rec->ac_etime) / (double) hzval;
|
||
|
# else
|
||
|
- double et = (double) rec->ac_etime / (double) AHZ;
|
||
|
+ double et = (double) rec->ac_etime / (double) hzval;
|
||
|
# endif
|
||
|
#endif
|
||
|
|
||
|
#ifdef HAVE_ACIO
|
||
|
# ifdef ACIO_COMPT
|
||
|
- double di = comp_t_2_double (rec->ac_io) / (double) AHZ;
|
||
|
+ double di = comp_t_2_double (rec->ac_io) / (double) hzval;
|
||
|
# else
|
||
|
- double di = (double) rec->ac_io / (double) AHZ;
|
||
|
+ double di = (double) rec->ac_io / (double) hzval;
|
||
|
# endif
|
||
|
#endif
|
||
|
|