@InterfaceAudience.Private public class Sleeper extends Object
限定符和类型 | 方法和说明 |
---|---|
int |
getPeriod() |
void |
skipSleepCycle()
If currently asleep, stops sleeping; if not asleep, will skip the next
sleep cycle.
|
void |
sleep()
Sleep for period.
|
void |
sleep(long sleepTime) |
public Sleeper(int sleep, Stoppable stopper)
sleep
- sleep time in millisecondsstopper
- When Stoppable.isStopped()
is true, this thread will
cleanup and exit cleanly.Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.