diff options
author | Martin Ruckert <martin.ruckert@hm.edu> | 2024-09-09 08:20:13 +0000 |
---|---|---|
committer | Martin Ruckert <martin.ruckert@hm.edu> | 2024-09-09 08:20:13 +0000 |
commit | ad8752dce449418f2e3cd7337133427a45bfa835 (patch) | |
tree | 8d2f67967bd1ae41c5c02c23bbb366faa3e35e94 /Build/source | |
parent | 9d38226fe1dbc08759ba8a0926353a8e725b3942 (diff) |
TeXprof: Using timespec_get under Windows
git-svn-id: svn://tug.org/texlive/trunk@72234 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/web2c/texprofdir/doc/texprof.hnt | bin | 11682720 -> 11684262 bytes | |||
-rw-r--r-- | Build/source/texk/web2c/texprofdir/doc/texprof.pdf | bin | 4189321 -> 4190250 bytes | |||
-rw-r--r-- | Build/source/texk/web2c/texprofdir/texprof.w | 12 |
3 files changed, 9 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/texprofdir/doc/texprof.hnt b/Build/source/texk/web2c/texprofdir/doc/texprof.hnt Binary files differindex 9317a489389..b5beeebffe9 100644 --- a/Build/source/texk/web2c/texprofdir/doc/texprof.hnt +++ b/Build/source/texk/web2c/texprofdir/doc/texprof.hnt diff --git a/Build/source/texk/web2c/texprofdir/doc/texprof.pdf b/Build/source/texk/web2c/texprofdir/doc/texprof.pdf Binary files differindex a8ed86ce73d..8cd616b4e8f 100644 --- a/Build/source/texk/web2c/texprofdir/doc/texprof.pdf +++ b/Build/source/texk/web2c/texprofdir/doc/texprof.pdf diff --git a/Build/source/texk/web2c/texprofdir/texprof.w b/Build/source/texk/web2c/texprofdir/texprof.w index d12cc93b978..69cbbb942b0 100644 --- a/Build/source/texk/web2c/texprofdir/texprof.w +++ b/Build/source/texk/web2c/texprofdir/texprof.w @@ -31233,11 +31233,12 @@ static long start_nsec, start_sec, diff_nsec; 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 @@ clock. #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 |