spin6lock / lua_custom_timer

add millisecond timer for lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lua_custom_timer

add millisecond timer for lua Lua provides os.time() and os.clock() for users. But os.clock() is pure CPU time, IO time is not included. And os.time() gives out seconds precise. It's too large for profiling. This timer gives out milliseconds precise with system-api gettimeofday.

Prerequisites

Works on Lua53, should be working on Lua52, too.

Not working on Windows, use HiRes library instead.

About

add millisecond timer for lua


Languages

Language:C 86.1%Language:Makefile 13.9%