Package osh :: Package command :: Module timer
[frames] | no frames]

Module timer

source code

timer [-t] INTERVAL

Generates a sequence of timestamps, separated in time by the specified INTERVAL (approximately). The INTERVAL format is:

   HH:MM:SS

where HH is hours, MM is minutes, SS is seconds. HH: and HH:MM: may be omitted.

Examples:

   INTERVAL        meaning
   -----------------------------
   5               5 seconds
   1:30            1 minute, 30 seconds
   1:00:00         1 hour

The output timestamp is time in seconds since 1/1/1970. If -t is specified, then the output timestamp is a tuple, matching what is returned by time.gmtime() and time.localtime(): (year, month, day of month, hour, minute, second, day of week, day of year, dst).

Notes:

Functions
 
timer(interval, tupleoutput=False)
Generates a sequence of timestamps, separated in time by the specified interval (approximately).
source code
Function Details

timer(interval, tupleoutput=False)

source code 

Generates a sequence of timestamps, separated in time by the specified interval (approximately). The interval format is HH:MM:SS, where HH is hours, MM is minutes, SS is seconds. HH: and HH:MM: may be omitted. Output items are numbers representing seconds since 1/1/1970, if tupleoutput is False, a tuple of (year, month, day of month, hour, minute, second, day of week, day of year, dst) otherwise.