parse-dateDate and Timepretty-time-intervalpretty-run-time-intervalGoTo Top

pretty-run-time-interval   internal-time-units &optional maximum-fields destination => result[Function]

Purpose
Format a run-time interval (in internal-time-units) into descriptive text.

Package   :gbbopen-tools

Module   :gbbopen-tools

Arguments and values

internal-time-units     A number
maximum-fields     An integer from 1–5 indicating maximum number of fields to include in the descriptive string (default is 5, indicating all fields should be included)
destination     Either nil, t, a stream, or a string with a fill pointer (default is nil)
result     A string or nil

Returns
If destination is non-nil, then nil; otherwise, a string.

Description
The internal-time-units run-time interval is rounded to the nearest 100th of a second before conversion. Fields omitted by maximum-fields cause appropriate rounding of the generated description.

See also
    pretty-time-interval

Examples

  > internal-time-units-per-second
  1000
  > (pretty-run-time-interval 1000)
  "1 second"
  > (pretty-run-time-interval 5)
  "0 seconds"
  > (pretty-run-time-interval 6)
  "0.01 seconds"
  > (pretty-run-time-interval most-positive-fixnum)
  "6 days, 5 hours, 7 minutes, 50.94 seconds"
  >


The GBBopen Project


parse-dateDate and Timepretty-time-intervalpretty-run-time-intervalGoTo Top