Site Tools


time_function
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


time_function [2007/07/10 22:09] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +# $EPIC: time_function.txt,v 1.4 2007/07/10 22:09:59 jnelson Exp $
 +======Synopsis:======
 +$__time__()
 +
 +======Technical:======
 +   * All arguments, if any, are ignored.
 +   * This function calls your system's time(3) function, which typically returns the number of seconds since the epoch, 1970 Jan 1 00:00:00 GMT.
 +   * In theory, every unix host should have the same time as every other unix host, but getting everyone to agree on the time is like herding cats.
 +   * If you need sub-second resolution, use the $[[utime function|utime]]() function.
 +
 +======Practical:======
 +You can convert the UTC value into human readable format using either the
 +$[[stime]]() function or the $[[strftime]]() function.  You can also use
 +the UTC value for tracking the elapsed time between two events.
 +
 +======Returns:======
 +The number of seconds that have elapsed since the epoch.
 +
 +======Examples:======
 +  $time()      might return "850381369"
 +
 +======History:======
 +This function first appeared in ircII.
  
time_function.txt · Last modified: 2007/07/10 22:09 by 127.0.0.1