texlive[72234] Build/source/texk/web2c/texprofdir: TeXprof: Using

commits+mruckert at tug.org commits+mruckert at tug.org
Mon Sep 9 10:20:13 CEST 2024


Revision: 72234
          https://tug.org/svn/texlive?view=revision&revision=72234
Author:   mruckert
Date:     2024-09-09 10:20:13 +0200 (Mon, 09 Sep 2024)
Log Message:
-----------
TeXprof: Using timespec_get under Windows

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/texprofdir/doc/texprof.hnt
    trunk/Build/source/texk/web2c/texprofdir/doc/texprof.pdf
    trunk/Build/source/texk/web2c/texprofdir/texprof.w

Modified: trunk/Build/source/texk/web2c/texprofdir/doc/texprof.hnt
===================================================================
(Binary files differ)

Modified: trunk/Build/source/texk/web2c/texprofdir/doc/texprof.pdf
===================================================================
(Binary files differ)

Modified: trunk/Build/source/texk/web2c/texprofdir/texprof.w
===================================================================
--- trunk/Build/source/texk/web2c/texprofdir/texprof.w	2024-09-09 08:04:43 UTC (rev 72233)
+++ trunk/Build/source/texk/web2c/texprofdir/texprof.w	2024-09-09 08:20:13 UTC (rev 72234)
@@ -31233,11 +31233,12 @@
 struct timespec ts;
 static int time_error;
 
-@ To get timing information, we use the |clock_gettime| function.
+@ To get timing information, we use the POSIX function |clock_gettime|.
 Depending on the operating system there are many different variations.
 The timer used for timing can be selected by defining |GETTIME| at
-compile time. The default is |GETTIME==0| which selects a tread specific
-clock.
+compile time. If |GETTIME| is not set, we try to find a good default.
+Currently we use |timespec_get| under Windows and |clock_gettime|
+with a tread specific clock otherwise.
 
 @<get current time@>= 
 #if GETTIME==0
@@ -31249,8 +31250,13 @@
 #elif GETTIME==3
    time_error=clock_gettime(CLOCK_MONOTONIC, &ts);
 #else
+/* guess a default */
+#ifdef _WIN32
+   time_error=timespec_get(&ts, TIME_UTC); 
+#else
    time_error=clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts);
 #endif
+#endif
 
 @ To record the timing information, we compute the time difference in
 nano seconds, assuming that it fits into unsigned 32 bit which means



More information about the tex-live-commits mailing list.