Quick actions

cmd+k|ctrl+k

Navigation

Languages

Delay

Snippet info

Language

Lua

Visibility

public

Author

qndr

Created

2024-12-31T04:59:47.740711Z

Updated

2024-12-31T08:06:27.167784Z

local function delay(time, func)
  local endTime = os.clock() + time
  local timeElapsed = os.clock()
  while timeElapsed ~= endTime do
    timeElapsed = os.clock()
  end
  func()
end

delay(0.00001, function()
  print("hru")
end)
INFO