Jelajahi Sumber

Drop difftime from DEBUG_TRACE_FUNC()

xtne6f 5 tahun lalu
induk
melakukan
821241f5e4
1 mengubah file dengan 1 tambahan dan 11 penghapusan
  1. 1 11
      src/civetweb.c

+ 1 - 11
src/civetweb.c

@@ -1736,27 +1736,18 @@ static void
 DEBUG_TRACE_FUNC(const char *func, unsigned line, const char *fmt, ...)
 {
 	va_list args;
-	uint64_t nsnow;
-	static uint64_t nslast;
 	struct timespec tsnow;
 
 	/* Get some operating system independent thread id */
 	unsigned long thread_id = mg_current_thread_id();
 
 	clock_gettime(CLOCK_REALTIME, &tsnow);
-	nsnow = ((uint64_t)tsnow.tv_sec) * ((uint64_t)1000000000)
-	        + ((uint64_t)tsnow.tv_nsec);
-
-	if (!nslast) {
-		nslast = nsnow;
-	}
 
 	flockfile(DEBUG_TRACE_STREAM);
 	fprintf(DEBUG_TRACE_STREAM,
-	        "*** %lu.%09lu %12" INT64_FMT " %lu %s:%u: ",
+	        "*** %lu.%09lu %lu %s:%u: ",
 	        (unsigned long)tsnow.tv_sec,
 	        (unsigned long)tsnow.tv_nsec,
-	        nsnow - nslast,
 	        thread_id,
 	        func,
 	        line);
@@ -1766,7 +1757,6 @@ DEBUG_TRACE_FUNC(const char *func, unsigned line, const char *fmt, ...)
 	putc('\n', DEBUG_TRACE_STREAM);
 	fflush(DEBUG_TRACE_STREAM);
 	funlockfile(DEBUG_TRACE_STREAM);
-	nslast = nsnow;
 }
 #endif /* NEED_DEBUG_TRACE_FUNC */