LoginSignup
0
1

More than 1 year has passed since last update.

【Swift】処理を一時的に止める

Posted at

はじめに

スレッドに関して、あまり理解していないので、間違っていることがあればコメントください

Thread

// 3秒中断
Thread.sleep(forTimeInterval: 3)

Task

// 3秒中断
try? await Task.sleep(nanoseconds: 3 * NSEC_PER_SEC)

おわり

何が違うんでしょう??
わかったら記事を更新します

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1