
--place the following line of code at the beginning of the program local startTime = zmg.ticks() local function timeElapsed() return math.floor((zmg.ticks()-startTime)/128) end local function wait(timeToWait) local start = timeElapsed() while timeElapsed() - start < timeToWait do end end