summaryrefslogtreecommitdiff
path: root/Data/BuiltIn/Libraries/middleclass/performance/time.lua
blob: dd024559d11ea15ee6015ca4d3ba05566bba64c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
return function(title, f)

  collectgarbage()

  local startTime = os.clock()

  for i=0,10000 do f() end

  local endTime = os.clock()

  print( title, endTime - startTime )

end