end_time

Lib.end_time : Timer.cpu_timer -> unit

Check a running timer, and print out how long it has been running.

An application end_time timer looks to see how long timer has been running, and prints out the elapsed runtime, garbage collection time, and system time.

Failure

Never fails.

Example

> val clock = start_time();
val clock = ?: Timer.cpu_timer

> use "foo.sml";
Exception- Io
  {cause = SysErr ("No such file or directory", SOME ENOENT), function =
   "TextIO.openIn", name = "foo.sml"} raised

> end_time clock;
runtime: 0.00026s,    gctime: 0.00000s,     systime: 0.00000s.
val it = (): unit

Comments

A start_timeend_time pair is for use when calling time would be clumsy, e.g., when multiple function applications are to be timed.

See also

Lib.start_time, Lib.time