EcIiptic
|
  |
| Joined: 12 Aug 2009 |
| Total Posts: 13737 |
|
|
| 21 May 2014 12:03 PM |
without it being = to wait()
Like, how small can I get before it's the same amount of time as wait()
#Piano |
|
|
| Report Abuse |
|
|
|
| 21 May 2014 12:05 PM |
game:service'RunService'.RenderStepped:connect(function()
end)
http://wiki.roblox.com/index.php?title=RenderStepped_(Event)
|
|
|
| Report Abuse |
|
|
|
| 21 May 2014 12:05 PM |
uh, I think you can do this, although it might just be waiting 0.043546 seconds or w/e
wait(0)
also, you can do this
w = wait() a = w print(a) |
|
|
| Report Abuse |
|
|
|
| 21 May 2014 12:05 PM |
@Ver
forgot about renderstepped, dang your ninja..q.q |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 21 May 2014 12:19 PM |
local Laps = {} for x = 1, 1000, 1 do local WAIT = wait() table.insert(Laps, WAIT) end local Total = 0 for _, x in pairs (Laps) do Total = Total + x end print("Average: " .. tostring(Total / #Laps)) print("Fastest: " .. tostring(math.min(unpack(Laps))))
wait() Average: 0.034172162818505 Fastest: 0.032403380127789
wait(0) Average: 0.034206922808097 Fastest: 0.032972001426458
wait(0.03) Average: 0.034107806849076 Fastest: 0.033682554886013
wait(1/30) Average: 0.034540824911504 Fastest: 0.033409848752967
local Laps = {} local Last = tick() local Loop = 1 Connect = Game:GetService("RunService").Stepped:connect(function() table.insert(Laps, (tick() - Last)) Last = tick() if Loop == 100 then Connect:disconnect() else Loop = Loop + 1 end end) repeat wait() until #Laps == 100
local Total = 0 for _, x in pairs (Laps) do Total = Total + x end print("Average: " .. tostring(Total / #Laps)) print("Fastest: " .. tostring(math.min(unpack(Laps))))
RunService Average: 0.033897471427917 Fastest: 0.0014431476593018 |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 21 May 2014 12:23 PM |
I redid the run service one with 1,000 laps instead of only 100 (Because I meant to do 1,000)
Average: 0.034140079498291 Fastest: 0.017651081085205 |
|
|
| Report Abuse |
|
|