local profile = require("core.profile")
local PlayAnimToEndAfterDelay = function(obj, delay, rate)
  if not _G.StartLevelTimer then
    require("level.timer")
  end
  if rate == nil then
    _G.StartLevelTimer(delay, function()
      obj:PlayAnimToEnd()
    end)
  else
    _G.StartLevelTimer(delay, function()
      obj:PlayAnimToEnd(rate)
    end)
  end
end
local CallFunctionAfterDelay = function(myFunction, delay)
  if not _G.StartLevelTimer then
    require("level.timer")
  end
  _G.StartLevelTimer(delay, myFunction)
end
return profile.WrapLibrary({PlayAnimToEndAfterDelay = PlayAnimToEndAfterDelay, CallFunctionAfterDelay = CallFunctionAfterDelay})
