Date And Time |
|
|
* [LuaDate] - Pure Lua date and time module for Lua 5.0/5.1 featuring date and time string parsing, time addition and subtraction, time span calculation, support for ISO 8601 Dates, local time support, and strftime-like formatting. |
|
* [LuaDate] - Pure Lua date and time module for Lua 5.0/5.1 featuring date and time string parsing, time addition and subtraction, time span calculation, support for ISO 8601 Dates, local time support, and strftime-like formatting. |
clock [1] function, and the precise meaning of this value is implementation specific. For example, on Linux, clock gives "CPU time" [2][3], which only counts the time in which the process is actively using the CPU and does not count time executing other processes or waiting for I/O. CPU time may be less than the real time ("wall clock time"). On Windows, clock counts real (wall clock) time since the start of the process [4]. On Windows and Linux, the resolution on clock is on the order of milliseconds, which is more precise than the time function, but on other systems it may be only one second resolution. The clock value will also wrap around on overflow, depending on the size of the data type used to represent clock_t. Sometimes this function is more useful than os.time for benchmarking: local clock = os.clock; local t1 = clock(); dosomething(); local dt = clock() - t1 .