comyar / chronos-swift Goto Github PK
View Code? Open in Web Editor NEW:hourglass: Grand Central Dispatch Utilities
License: MIT License
:hourglass: Grand Central Dispatch Utilities
License: MIT License
fatal error: Double value cannot be converted to Int because the result would be greater than Int.max
Any chance you can update it for tvOS support with cocoapods? :)
No matter what I set the duration value to, it repeats as fast as possible, like every microsecond.
(iOS10, Xcode8, Swift3)
self.runLoopTimer = DispatchTimer(interval: 5.0 , closure: {
(timer: RepeatingTimer, count: Int) in
<do stuff>
})
self.runLoopTimer?.start(true)
I can't get a label counter working with this lib, how to set it up?. I have a separate function which does the label update with NSTimer I used
func fireProgress(timer: NSTimer) {
self.valueLabel.text = self.timeRemaining
}
how can I do the same with this lib?
Hi! I been using this library for a while and I like, thanks.
The start function crash in when call scheduleRepeating due an overflow
open func start(_ now: Bool) {
validate()
if OSAtomicCompareAndSwap32Barrier(State.paused, State.running, &running) {
timer.scheduleRepeating(deadline: startTime(interval, now: now), interval: DispatchTimeInterval.nanoseconds(Int(interval.multiplied(by: Double(NSEC_PER_SEC)))))
timer.resume()
}
}
Also when you run the unit test in the iphone 5 you get this error message: "DispatchTimerTests.swift:38:96: Integer overflows when converted from 'UInt64' to 'Int'"
I will make a pr for this issue.
Thanks
I got this error when build project with carthage.
ChronosTests/DispatchTimerTests.swift:38:96: error: integer overflows when converted from 'UInt64' to 'Int'
return DispatchTime(uptimeNanoseconds: DispatchTime.now().uptimeNanoseconds.advanced(by: Int(5 * NSEC_PER_SEC)))
I am having building issues when trying to build with Carthage
$ carthage bootstrap --platform iOS
*** Checking out Chronos-Swift at "f6c02db716bdbc5404108fc06a6e61abcef4963e"
*** Skipped building Chronos-Swift due to the error:
Dependency "Chronos-Swift" has no shared framework schemes for any of the platforms: iOS
Any thoughts?
Hi, I must be doing something wrong.. I get the following error on lines 141 and 155:
Initializer for conditional binding must have Optional type, not 'dispatch_source_t' (aka 'OS_dispatch_source')
Any help appreciated..
When delay <= 5.0 I get timer repeating forever as expected when app is in background. When I set delay larger, it fires once in background and then never repeats. (iOS10, Xcode8, Swift3)
self.runLoopTimer = VariableTimer(closure: {
(timer: RepeatingTimer, count: Int) -> Void in
<do stuff>
}) {(timer: VariableTimer, count: Int) -> Double in
DDLogVerbose("RunLoopMode -> \(self.runLoopMode):\(self.runLoopMode.rawValue)")
return self.runLoopMode.rawValue
}
self.runLoopTimer?.start(true)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.