Set delay so js doesn't choke the CPU