403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.168
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/math/taucs/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/math/taucs/files/patch-src__taucs_timer.c
--- src/taucs_timer.c.orig	2003-09-01 10:28:54 UTC
+++ src/taucs_timer.c
@@ -245,36 +245,35 @@ double timer()
 #include <sys/time.h>
 #include <sys/resource.h>
 #include <sys/types.h>                                                 
-#include <sys/timeb.h>                                                 
 
 double taucs_wtime()
 {
-  struct timeb T;
+  struct timeval T;
   /*static int first_time    = 1;*/
   /*  static time_t start_time, time_diff;
-      static time_t start_mill, mill_diff;
+      static time_t start_micro, micro_diff;
   */
 
   static time_t time_diff;
-  static time_t mill_diff;
+  static time_t micro_diff;
   /*int    rc;*/
   double dt;
   
-  (void) ftime( &T );
+  (void) gettimeofday( &T,NULL );
   /*
   if (first_time) {
     first_time = 0;
-    start_time = T.time;
-    start_mill = T.millitm;
+    start_time = T.tv_sec;
+    start_micro = T.tv_usec;
   }
 
-  time_diff = T.time - start_time;
-  mill_diff = T.millitm - start_mill; 
+  time_diff = T.tv_sec - start_time;
+  micro_diff = T.tv_usec - start_micro; 
   */
-  time_diff = T.time;
-  mill_diff = T.millitm;
+  time_diff = T.tv_sec;
+  micro_diff = T.tv_usec;
 
-  dt = ((double) time_diff) + (1e-3) * ((double) mill_diff);
+  dt = ((double) time_diff) + (1e-6) * ((double) micro_diff);
 
   return dt;
 }

Youez - 2016 - github.com/yon3zu
LinuXploit