os
Time and date only. No execute, remove, getenv or exit.
Functions
os.time
os.time([t]) -> integer| Name | Type | Description |
|---|---|---|
| toptional | table | {year, month, day [, hour=12, min, sec]}, local time. |
Seconds since 1970, UTC.
os.clock
os.clock() -> numberHigh-resolution seconds since the first call.
os.date
os.date([format] [, t]) -> string | table| Name | Type | Description |
|---|---|---|
| formatoptional | string | "*t" gives a table; leading ! uses UTC. Default "%c". |
| toptional | integer | Time to format. Default now. |
Formats a time.
Supports %a %A %b %B %c %d %D %e %F %H %I %j %m %M %n %p %S %t %T %u %w %x %X %y %Y %%.
os.difftime
os.difftime(t2 [, t1]) -> number| Name | Type | Description |
|---|---|---|
| t2 | integer | |
| t1optional | integer | Default 0. |
t2 minus t1, in seconds.