Skip to content
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.

Not sure this be useful, but... #11

Closed
dmrev opened this issue Sep 14, 2015 · 1 comment
Closed

Not sure this be useful, but... #11

dmrev opened this issue Sep 14, 2015 · 1 comment

Comments

@dmrev
Copy link

dmrev commented Sep 14, 2015

What about CFTimeInterval and CACurrentMediaTime() instead of NSDate?

private static var executionTimeByName = [String: CFTimeInterval]()
...
if let lastExecutedTime = executionTimeByName[name] {
            let elapsed = CACurrentMediaTime() - lastExecutedTime
            shouldExecute = elapsed > limit
}
...
@soffes
Copy link
Owner

soffes commented Sep 14, 2015

I like NSDate more.

@soffes soffes closed this as completed Sep 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants