]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 4 Nov 2014 14:12:40 +0000 (14:12 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 4 Nov 2014 14:12:40 +0000 (14:12 +0000)
MagickCore/timer.c

index 5bba0746a0ffd5fc34e18454a6afc883f8d10d70..a9a1fe6889adc632f3eb075691cbdf04d4cadd08 100644 (file)
 /*
   Define declarations.
 */
-#if defined(macintosh)
-#define CLK_TCK  CLOCKS_PER_SEC
-#endif
-#if !defined(CLK_TCK)
-#define CLK_TCK  sysconf(_SC_CLK_TCK)
+#if !defined(CLOCKS_PER_SEC)
+#define CLOCKS_PER_SEC  100
 #endif
 \f
 /*
@@ -195,12 +192,12 @@ static double ElapsedTime(void)
   struct tms
     timer;
 
-  return((double) times(&timer)/CLK_TCK);
+  return((double) times(&timer)/CLOCKS_PER_SEC);
 #else
 #if defined(MAGICKCORE_WINDOWS_SUPPORT)
   return(NTElapsedTime());
 #else
-  return((double) clock()/CLK_TCK);
+  return((double) clock()/CLOCKS_PER_SEC);
 #endif
 #endif
 }
@@ -450,12 +447,12 @@ static double UserTime(void)
     timer;
 
   (void) times(&timer);
-  return((double) (timer.tms_utime+timer.tms_stime)/CLK_TCK);
+  return((double) (timer.tms_utime+timer.tms_stime)/CLOCKS_PER_SEC);
 #else
 #if defined(MAGICKCORE_WINDOWS_SUPPORT)
   return(NTUserTime());
 #else
-  return((double) clock()/CLK_TCK);
+  return((double) clock()/CLOCKS_PER_SEC);
 #endif
 #endif
 }