Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 315 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 315 Bytes

chronos

High resolution monotonic timers for Lua

do
    local chronos = require("chronos")


    local start = chronos.nanotime()
    os.execute("sleep 1")
    local stop = chronos.nanotime()

    print(("sleep took %s seconds"):format(stop - start))
end
>> sleep took 1.0042656199948 seconds