99热99这里只有精品6国产,亚洲中文字幕在线天天更新,在线观看亚洲精品国产福利片 ,久久久久综合网

歡迎加入QQ討論群258996829

Swift 優(yōu)雅的定時器及執(zhí)行工具庫 Each

發(fā)布時間:2017-07-20 22:14  回復(fù):0  查看:7020  感興趣:104  贊:5   最后回復(fù):2017-07-20 22:14  
Each 是一個優(yōu)雅的定時器及執(zhí)行工具庫,用Swift編寫。
特性:
  • 完全可配置的定時器   
  • 支持以毫秒,秒,分和小時為單位的時間間隔   
  • 完全可擴展   
  • 與NSTimer對象相比,使用起來更加可讀和簡單
示例代碼:
let timer = Each(1).seconds     // Can be .milliseconds, .seconds, .minute, .hours  

timer.perform {
    // Do your operations
    // This closure has to return a NextStep value
    // Return .continue if you want to leave the timer active, otherwise
    // return .stop to invalidate it
}

timer.stop()    // This stops immediately the timer

timer.restart()


相關(guān)開源代碼

您還未登錄,請先登錄

熱門帖子

最新帖子

?