I’ve always wondered, how much time does wait() wait for? i know it isn’t just 0 seconds since it has some very small delay.
It’s about 1/30th of a second ideally
It’s very rarely exactly this and with lag it’s hardly even close
So it’s 0.0333? It feels like a way less amount of time since wait(0.01) is slower than wait()
No it is in fact 0.03333 on average and we can check this by doing the following:
local previousTime = tick()
while true do
wait()
print(tick() - previousTime)
previousTime = tick()
end
which prints around 0.033 to the output
The engine runs that code at 30 frames a second. If it is running slower, it could be less than 30 frames a second.
1/30 is the expected minimum wait time possible using wait().
1/30 is the same as 0.0333…
No it’s roughly 0.03 of a second which is 3 hundredths of a second. This is also (roughly) the lowest that it can go, wait(0.00000000000000000000000000000000000000000001), wait(0.01) and wait(0.03) should be roughly same thing.
Also note that wait() varies a lot, so task.wait (which is a part of the new task library) should be used instead as it varies a lot less and has a smaller minimum time (roughly 1/60th of a second which is usually roughly equal to 1 frame)
It’s around 0.3 seconds, rounded, but I’ve seen one higher (0.4 in specific)
You can do
print(wait())