[dev-context] Time primitives

Hans Hagen pragma at wxs.nl
Mon May 9 22:28:03 CEST 2005


Taco Hoekwater wrote:
> Hi Hans,
> 
> Would new (pdf)etex primitives like these help benchmarking context?
> 
> Two static read-only values that amend the normal TeX ones like
> \time and \year, giving the passed seconds since 1 jan 1970 at
> start-of-run:
> 
>   \epochseconds  % integer part
>   \microseconds  % fractional part (between and 0-1000000)
> 
> And one dynamic one:
> 
>   \microinterval % interval since start-of-run, in microseconds
> 
> The static seconds and microseconds have be split in two because the
> multiplication of two C long-s cannot fit in one \count register.
> 
> I need the initialization values only so that I can create
> meaningful intervals, but I thought it might be useful to have
> them available.

nice

> If you prefer something more or different, let me know.

maybe something

\basicloop <counter> {token list}

(kind of \testfeature in context) so that one does not have interference of loop 
macros; i assume that a native loop has neglectable consequences

(this reminde me that we had some discussion about reals i.e. dimenless dimens 
and that you had a brain wave about that)

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
-----------------------------------------------------------------



More information about the dev-context mailing list