maybe the timedtask should run every x frames instead of x seconds. this could cause problems if a frame already took a long time