[pdftex] [tex-live] \pdfelapsedtime
Heiko Oberdiek
oberdiek at uni-freiburg.de
Mon Nov 2 01:56:28 CET 2009
On Mon, Nov 02, 2009 at 08:23:19AM +1030, Will Robertson wrote:
> On 02/11/2009, at 3:20 AM, Joseph Wright wrote:
>
> >See the same here on Snow Leopard (MacOS X 10.6.1, Intel) with an up
> >to date TeX Live, and on Ubuntu (Janty), but not on Windows (TL also
> >up to date). Not too surprising that the Mac and Ubuntu give the
> >same result.
>
> Thanks for the confirmation.
I can also confirm it (Linux). The value 65536 is 1s exactly.
If you wait a little longer:
\documentclass{article}
\showthe\pdfelapsedtime
\begin{document}
\showthe\pdfelapsedtime
\end{document}
Then you can see some multiples of 65536.
> Does anyone here know why this might be happening?
Something went wrong with the compilation.
texk/web2c/lib/texmfmp.c contains get_seconds_and_micros:
get_seconds_and_micros (integer *seconds, integer *micros)
{
#if defined (HAVE_GETTIMEOFDAY)
struct timeval tv;
gettimeofday(&tv, NULL);
*seconds = tv.tv_sec;
*micros = tv.tv_usec;
#elif defined (HAVE_FTIME)
struct timeb tb;
ftime(&tb);
*seconds = tb.time;
*micros = tb.millitm*1000;
#else
time_t myclock = time((time_t*)NULL);
*seconds = myclock;
*micros = 0;
#endif
}
Apparently the micros are always zero, that means, neither
HAVE_GETTIMEOFDAY nor HAVE_FTIME has been set.
texk/web2c/configure doesn't check for ftime and gettimeofday,
but the version of pdftex 1.40.9 does.
(Also texk/web2c/c-auto.in of pdftex 1.40.9 contains:
/* Define to 1 if you have the `ftime' function. */
#undef HAVE_FTIME
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
1.40.10 misses these lines.)
Yours sincerely
Heiko <oberdiek at uni-freiburg.de>
More information about the pdftex
mailing list