use sleep to reduce cpu load