perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/src/modules/perl modperl_time.h
Date Sat, 20 Oct 2001 03:35:54 GMT
stas        01/10/19 20:35:54

  Modified:    src/modules/perl modperl_time.h
  Log:
  - handle platforms which don't have HZ constant defined
  
  Revision  Changes    Path
  1.2       +8 -2      modperl-2.0/src/modules/perl/modperl_time.h
  
  Index: modperl_time.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_time.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_time.h	2001/01/21 23:19:03	1.1
  +++ modperl_time.h	2001/10/20 03:35:54	1.2
  @@ -1,6 +1,12 @@
   #ifndef MODPERL_TIME_H
   #define MODPERL_TIME_H
   
  +#ifdef HZ
  +#   define MP_HZ HZ
  +#else
  +#   define MP_HZ 100
  +#endif
  +
   #ifdef MP_TRACE
   #define dMP_TIMES \
       struct tms start_time; \
  @@ -18,9 +24,9 @@
   #define MP_PRINT_TIMES(label) \
       MP_TRACE_t_do({ \
           double utime = \
  -             (double)(end_time.tms_utime - start_time.tms_utime)/HZ; \
  +             (double)(end_time.tms_utime - start_time.tms_utime)/MP_HZ; \
           double stime = \
  -             (double)(end_time.tms_stime - start_time.tms_stime)/HZ; \
  +             (double)(end_time.tms_stime - start_time.tms_stime)/MP_HZ; \
           if (utime || stime) { \
               MP_TRACE_t(MP_FUNC, "%s %5.2f user %5.2f sys\n", \
                          label, utime, stime); \
  
  
  

Mime
View raw message