(get_run_time): Return an approximate value for NT.
authorRichard Kenner <kenner@gcc.gnu.org>
Tue, 21 Feb 1995 23:57:45 +0000 (18:57 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 21 Feb 1995 23:57:45 +0000 (18:57 -0500)
From-SVN: r9019

gcc/toplev.c

index 2d31fd7b76eadab098cd29a2dfa8f1dfcaec57f4..a348aa81770acc1ad962886bd2300cb2605af39e 100644 (file)
@@ -931,15 +931,13 @@ int dump_time;
 int
 get_run_time ()
 {
-#ifdef WINNT
-  return 0;
-#else
+#ifndef WINNT
 #ifdef USG
   struct tms tms;
 #else
 #ifndef VMS
   struct rusage rusage;
-#else /* VMS */
+#else
   struct
     {
       int proc_user_time;
@@ -948,11 +946,17 @@ get_run_time ()
       int child_system_time;
     } vms_times;
 #endif
+#endif
 #endif
 
   if (quiet_flag)
     return 0;
-
+#ifdef WINNT
+  if (clock() < 0)
+    return 0;
+  else
+    return (clock() * 1000);
+#else /* not WINNT */
 #ifdef USG
   times (&tms);
   return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);