Profile
- Name
- Test: os.difftime between simple calculation
- ID
- 30973
- Shared with
- Public
- Parent
- None
- Children
- Created on
- August 11, 2011 at 11:40 AM UTC
- Updated on
- August 11, 2011 at 11:40 AM UTC
- Description
This test between os.difftime and simple calculations.
Best for
Code
p = print
local t1 = os.time()
for i = 1, 100000 do
local t3 = t1-t1
end
local t2 = os.time()
p("Time needed: ", t2 - t1)
for i = 1, 100000 do
t3 = os.difftime(t2,t1)
end
t3 = os.time()
p("Time needed:", t3 - t2)