[Larceny-users] Getting unix-era time in Larceny

William D Clinger will at ccs.neu.edu
Mon Mar 26 15:54:57 EDT 2007

David Rush wrote:
> I'm sure there is a straightforward way to get this that my incipient
> migraine is preventing me from finding. The closest I have seen so far
> appears to be the entry point osdep_cpuclock or possibly
> osdep_realclock down in the Rts innards. I can't see how either of
> these get surfaced to procedures at the repl.
> And just to be difficult, I do need it to work on windows :) Any suggestions?

This probably isn't what you want, but explaining why
it isn't what you want might help me to understand
what you want:

    (define (user-time) (memstats-user-time (memstats)))

    (define (system-time) (memstats-system-time (memstats)))

Those things return cpu time (user or system) in milliseconds,

    > (user-time)

    > (system-time)


More information about the Larceny-users mailing list