zoukankan      html  css  js  c++  java
  • Thread.sleep() & SystemClock.sleep()

    Thread.sleep()是java提供的函数。在调用该函数的过程中可能会发生InterruptedException异常。

    SystemClock.sleep()是android提供的函数。在调用该函数的过程中不会发生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.

  • 相关阅读:
    day_13
    day_12
    day_11
    day_10
    day_09
    day_08
    day_07
    day_06
    cmder 基本配置和使用
    php自动加载
  • 原文地址:https://www.cnblogs.com/hjtdlx/p/3925018.html
Copyright © 2011-2022 走看看