Skip to content
This repository was archived by the owner on May 1, 2026. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Src/SwiftyTimer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import Foundation

private class NSTimerActor {
var block: () -> Void
let block: () -> Void

init(_ block: () -> Void) {
self.block = block
Expand Down Expand Up @@ -81,7 +81,7 @@ extension NSTimer {
/// Specify `runLoop` or `modes` to override these defaults.

public func start(runLoop: NSRunLoop = NSRunLoop.currentRunLoop(), modes: String...) {
let modes = modes.count != 0 ? modes : [NSDefaultRunLoopMode]
let modes = modes.isEmpty ? [NSDefaultRunLoopMode] : modes

for mode in modes {
runLoop.addTimer(self, forMode: mode)
Expand Down