► |  | How to Design Programs Languages

1 | Beginning Student
2 | Beginning Student with List Abbreviations
3 | Intermediate Student
4 | Intermediate Student with Lambda
5 | Advanced Student
| Index

▼ | 3 | Intermediate Student

3.1 | define
3.2 | define-struct
3.3 | local
3.4 | letrec, let, and let*
3.5 | Function Calls
3.6 | time
3.7 | Identifiers
3.8 | Primitive Operations
3.9 | Unchanged Forms

On this page:

time

top← prev up next →

#### 3.6`` time

(time expr)

This form is used to measure the time taken to evaluate expr. After evaluating expr, Scheme prints out the time taken by the evaluation (including real time, time taken by the cpu, and the time spent collecting free memory) and returns the result of the expression.

(The reported time is measured as the number of milliseconds of CPU time required to obtain this result, the number of “real” milliseconds required for the result, and the number of milliseconds of CPU time (included in the first result) spent on garbage collection. The reliability of the timing numbers depends on the platform.)

top← prev up next →