Skip to content

Commit 8b3497a

Browse files
authored
Add Float64 type
1 parent 5cd2bf5 commit 8b3497a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/watcher.cr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module Watcher
88
property status = false, files = {} of String => String
99
getter interval
1010

11-
def initialize(@interval : Int32)
11+
def initialize(@interval : Int32 | Float64)
1212
end
1313

1414
# Allow to yield a block when a file changes
@@ -36,7 +36,7 @@ module Watcher
3636
end
3737

3838
# Allow to watch file changes using Watcher.watch
39-
def self.watch(files, interval : Int32 | Float64 = 1)
39+
def self.watch(files, interval = 1)
4040
event = WatchEvent.new(interval)
4141
loop do
4242
event = scanner(files, event)
@@ -48,7 +48,7 @@ module Watcher
4848
end
4949

5050
# Allow to watch file changes
51-
def watch(files, interval : Int32 | Float64 = 1)
51+
def watch(files, interval = 1)
5252
Watcher.watch(files, interval) do |event|
5353
yield event
5454
end

0 commit comments

Comments
 (0)