tdiff
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | tdiff [2006/08/29 16:08] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | # $EPIC: tdiff.txt,v 1.2 2006/08/20 17:37:08 sthalik Exp $ | ||
+ | ======Synopsis: | ||
+ | $__tdiff__(< | ||
+ | $__tdiff2__(< | ||
+ | |||
+ | ======Technical: | ||
+ | * If the < | ||
+ | * The argument is taken to be the number of seconds (floating point is permitted) between two timed events. | ||
+ | * $tdiff() returns the number of elapsed seconds in the following format: \\ < | ||
+ | |||
+ | If < | ||
+ | If < | ||
+ | Otherwise, then "< | ||
+ | plus | ||
+ | If < | ||
+ | If < | ||
+ | Otherwise, then "< | ||
+ | plus | ||
+ | If < | ||
+ | If < | ||
+ | Otherwise, then "< | ||
+ | plus | ||
+ | If < | ||
+ | or < | ||
+ | If < | ||
+ | then "< | ||
+ | If < | ||
+ | Otherwise, then "< | ||
+ | |||
+ | * $tdiff2() returns the same thing that $tdiff() does, modulo: | ||
+ | * " | ||
+ | * The units indicator immediately follows the number. | ||
+ | * Plurals are not indicated. | ||
+ | * If a trailing space exists at the end of the string, it is removed. | ||
+ | * Negative numbers are acceptable and will yield negative results. | ||
+ | |||
+ | ======Practical: | ||
+ | These functions are useful for showing how much time has elapsed | ||
+ | since a particular event. For instance, they can convert your idle | ||
+ | time from the number of seconds to a more readable form. | ||
+ | |||
+ | ======Returns: | ||
+ | A human readable string representing some elapsed time. | ||
+ | |||
+ | ======History: | ||
+ | This function first appeared in ircII-2.2pre5 | ||
+ | |||
+ | ======Examples: | ||
+ | < | ||
+ | $tdiff(248576) | ||
+ | $tdiff(-248576) | ||
+ | $tdiff2(248576) | ||
+ | $tdiff2(-248576) | ||
+ | $tdiff2(3602) | ||
+ | </ | ||
tdiff.txt · Last modified: 2006/08/29 16:08 by 127.0.0.1