Thread.sleep()是java提供的函數(shù)毅哗。在調(diào)用該函數(shù)的過程中可能會發(fā)生InterruptedException異常榜轿。
SystemClock.sleep()是android提供的函數(shù)。在調(diào)用該函數(shù)的過程中不會發(fā)生InterruptedException異常,中斷事件將要被延遲直到下一個中斷事件。
SystemClock.sleep(millis) is a utility function very similar to Thread.sleep(millis), but it ignores InterruptedException. Use this function for delays if you do not use Thread.interrupt(), as it will preserve the interrupted state of the thread.