[ pdftex-Patches-341 ] \microinterval patch
Patches item #341, was opened at 2005-05-10 19:17 You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=495&aid=341&group_id=106 Category: None Group: None
Status: Open Resolution: None Priority: 5 Submitted By: Taco Hoekwater (taco) Assigned to: Nobody (None) Summary: \microinterval patch
Initial Comment: This change file provides two integer parameters that amend the normal TeX ones like \time and \year, giving the passed time since 1 jan 1970, stored at the start of the TeX run: \epochseconds integer part \microseconds fractional part (between and 0-1000000) And one read-only parameter that is computed each time it is queried: \microinterval interval between now() and the values stored in \epochseconds and \microseconds You are free to change \epochseconds and \microseconds, but strange results may occur if you do. ----------------------------------------------------------------------
Comment By: Taco Hoekwater (taco) Date: 2005-05-11 19:52
Message: Logged In: YES user_id=1608 Reopened with a much better patch attached ---------------------------------------------------------------------- Comment By: Taco Hoekwater (taco) Date: 2005-05-10 23:33 Message: Logged In: YES user_id=1608 removed while Hans and I think of a better interface ---------------------------------------------------------------------- You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=495&aid=341&group_id=106
Hi, The just uploaded patch is much better than the original, both in the api and in the change file quality. Hans and I are pleased with it, so as far as we are concerned, this is as-good-as-it-gets. Of course we hope Thanh is willing to integrate this into a future pdftex. Two new primitives are provided: \item \verb|\elapsedtime| is 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, \verb|\maxint| will be returned. \item \verb|\resettime| updates the internal timer, such that subsequent calls to \verb|\elapsedtime| will restart from 0. A bit of example code (in plain): {\catcode`\p=12 \catcode`\t=12 \gdef\WITHOUTPT#1pt{#1}} \def\withoutpt#1{\expandafter\WITHOUTPT#1} \resettimer \def\a{} \loop \ifnum\count1<5000 \edef\a{a\a}\advance\count1 1 \repeat \dimen0=\elapsedtime sp \message{loop took \expandafter\withoutpt\the\dimen0seconds} \bye Greetings, Taco (and sorry for the extra noise on this list) noreply@sarovar.org wrote:
Patches item #341, was opened at 2005-05-10 19:17 You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=495&aid=341&group_id=106
On 2005-05-11 20:08:35 +0200, Taco Hoekwater wrote:
The just uploaded patch is much better than the original,
It's reverse, which makes applying it quite difficult. :-( The patch seems very good, but I'll forward the idea to tex-implementors; this seems like a very nice extension. Best regards Martin -- http://www.tm.oneiros.de
On Thu, May 12, 2005 at 02:45:00PM +0200, Martin Schröder wrote:
On 2005-05-11 20:08:35 +0200, Taco Hoekwater wrote:
The just uploaded patch is much better than the original,
It's reverse, which makes applying it quite difficult. :-(
The patch seems very good, but I'll forward the idea to tex-implementors; this seems like a very nice extension.
sounds good. So I will leave it out for the moment. Thanh
The Thanh Han wrote:
On Thu, May 12, 2005 at 02:45:00PM +0200, Martin Schröder wrote:
On 2005-05-11 20:08:35 +0200, Taco Hoekwater wrote:
The just uploaded patch is much better than the original,
It's reverse, which makes applying it quite difficult. :-(
The patch seems very good, but I'll forward the idea to tex-implementors; this seems like a very nice extension.
sounds good. So I will leave it out for the moment.
i see no reason to not put it in -) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (5)
-
Hans Hagen
-
Martin Schröder
-
noreply@sarovar.org
-
Taco Hoekwater
-
The Thanh Han