Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!mcsun!i2unix!inria!geocub!casteran From: casteran@geocub.greco-prog.fr (Pierre Casteran) Newsgroups: comp.lang.scheme Subject: (time ...) Message-ID: <229@geocub.greco-prog.fr> Date: 24 Aug 90 08:55:07 GMT Organization: University of Bordeaux I - FRANCE Lines: 30 In Chez-Scheme, there exists a function named 'time' such that, when you evaluate (time ) , you get as a result the value of and the cpu-time , the real-time , allocated space and the number of GC are *printed*. I am writing a program the structure of which is: (do ((i ....)) ((= i 0) ...) (time (f i) )) and i wish to accumulate the various evaluation times in order to do statistics. Since 'time ' only prints these times, i don't know how to recover these times. Does anybody have a solution to this kind of problem? A suggestion to implementors: give to the users some CPS version of this kind of primitives, in order to allow some constructs as: (cps-time (fib 20) (lambda (value cpu-time real-time number-of-gcs) (set! *total-cpu* (+ cpu-time *total-cpu*)) value)) or: (cps-quotient 1000 35 (lambda (quotient rest) ....)) Pierre Casteran