Add periodic and spin wait