Next Previous Up Top Contents Index

2.6 The COMMON-EXTENSIONS module

timing

Statement macro

Summary

Returns the time, in seconds and microseconds, spent executing the body of code it is wrapped around.

Macro call

timing () [ body ] end [ timing ]

Arguments

body
A Dylan bodybnf

Values

seconds
An instance of <integer>.

microseconds
An instance of <integer>.

Library

common-extensions

Module

common-extensions

Description

Returns the time, in seconds and microseconds, spent executing the body of code it is wrapped around.

The first value returned is the number of whole seconds spent in body. The second value returned is the number of microseconds spent in body in addition to seconds.

Example

An example:

timing () 
  for (i from 0 to 200) 
    format-to-string("%d %d", i, i + 1) 
  end
end;
=> 1 671000

Common Dylan and Functional Extensions - 31 Mar 00

Next Previous Up Top Contents Index