for bug #237, never sleep when thread interval is 0.