I am wondering what an integer in LaTeX is. I take this from pdfTeX release notes (2005-08-01)
\pdfelapsedtimeis a read-only integer that (initially) returns the amount of time passed since the start of this run. This amount is given in `scaled seconds': the value 65536 counts as one second. If more time has passed than 32767 seconds, (2^31)-1 will be returned.\pdfresettimerupdates the internal timer, such that subsequent calls to\pdfelapsedtimewill restart from 0.
so I guess the return value from \pdfelapsedtime is an integer. I have to use \the\pdfelapsedtime to cast it to string value (please correct my words to the LaTeX conventions, I hope everybody knows what I mean). To further elucidate my problem, please look at the following MWE:
\documentclass{minimal}
\newcount\benchmarkcount
\begin{document}
\pdfelapsedtime
\benchmarkcount
\end{document}
The first error is ! You can't use '\pdfelapsedtime' in vertical mode. while the second one gives ! Missing number, treated as zero. So an integer is not the same as a counter either.
Is there anything -- let me call it \foo -- that casts a string to become an integer, e.g. \foo\the\pdfelapsedtime.
Or, that would solve my problem as well, is there an analog to \directlua{tex.print(...)} that gives an integer back?
background: I am working on the answer to this question and try to make the lualatex \pdfelapsedtime macro as identical to the pdflatex one as possible.