Skip to content

Commit

Permalink
Minor bug fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
ideastouch committed Jan 20, 2019
1 parent 7c4315e commit cd5eead
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CocoaDaemon.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'CocoaDaemon'
s.version = '0.9.4'
s.version = '0.9.5'
s.summary = 'Daemon Kit to manage background closures to be called each set period of time.'
s.homepage = 'https://github.com/ideastouch/CocoaDaemon'
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
4 changes: 2 additions & 2 deletions CocoaDaemon/CocoaDaemon/Daemon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ public class Daemon {
if let value = active {
block_dictionary[.Active] = value }
if let value = seconds {
assert(value < 0, "Seconds can't be negative")
assert(value > 0, "Seconds can't be negative")
block_dictionary[.Seconds] = value }
self.queue_block_dictionary[name] = block_dictionary } }

/**
Read class description in order to understand better "submmitBlock" method.
*/
public func submmitBlock(_ name:String, block:@escaping ((_ scheduleNext: @escaping ()->Void)->Void), active:Bool, seconds:Double) {
assert(seconds < 0, "Seconds can't be negative")
assert(seconds > 0, "Seconds can't be negative")
let nameInUse = self.nameInUse(name)
if nameInUse {
self.updateBlock(name, active: active, seconds: seconds) }
Expand Down

0 comments on commit cd5eead

Please sign in to comment.