Fix(ios): fix real time issue when fast zapping (#3582)
* fix(ios): fix real time issue when doing fast zapping * fix(ios): fix delay implementation (timing was not applied correctly) * chore: fix random crash in sample * chore: fix linter
This commit is contained in:
@@ -364,7 +364,7 @@ enum RCTVideoUtils {
|
||||
|
||||
static func delay(seconds: Int = 0) -> Promise<Void> {
|
||||
return Promise<Void>(on: .global()) { fulfill, _ in
|
||||
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(seconds)) / Double(NSEC_PER_SEC)) {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(seconds)) {
|
||||
fulfill(())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user