Is there a common way to get the current time in or with milliseconds?
There is os.time(), but it only provides full seconds.
os.time()
If you want to benchmark, you can use os.clock as shown by the doc:
local x = os.clock() local s = 0 for i=1,100000 do s = s + i end print(string.format("elapsed time: %.2f\n", os.clock() - x))