Swiftpack.co -  Loupehope/TITimer as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Loupehope/TITimer
Pretty timer ⏰
.package(url: "https://github.com/Loupehope/TITimer.git", from: "1.0.0")

TITimer

Pretty timer ⏰

The library allows you to create a timer that works either with RunLoop or with GCD.

Features

  • Track the time even while the application is in the background. For more, see - TimerRunMode
  • Create a timer on a personal queue or on a special Runloop mode. For more, see - TimerType
  • The code is covered by tests 🙂

Examples

RunLoop

timer = TITimer(type: .runloopTimer(runloop: .current, mode: .default), mode: .activeAndBackground)
        
timer.eventHandler = {
   // handle elapsed time
}
        
timer.start()
timer.invalidate()

GCD

timer = TITimer(type: .dispatchSourceTimer(queue: .main), mode: .activeAndBackground)
        
timer.eventHandler = {
   // handle elapsed time
}
        
timer.start()
timer.invalidate()

GitHub

link
Stars: 0
Last commit: 4 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

1.0.0 ❤️
4 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics