timer
parent
6b47af9e9f
commit
77026a249a
|
@ -1 +1,8 @@
|
|||
require "./ipc/*"
|
||||
require "./ipc/lowlevel.cr"
|
||||
require "./ipc/exception.cr"
|
||||
require "./ipc/message.cr"
|
||||
require "./ipc/event.cr"
|
||||
require "./ipc/switch.cr"
|
||||
require "./ipc/context.cr"
|
||||
require "./ipc/client.cr"
|
||||
require "./ipc/service.cr"
|
||||
|
|
|
@ -83,11 +83,11 @@ class IPC::Context
|
|||
end
|
||||
|
||||
def loop(&block : Proc(IPC::Event::Events|Exception, Nil))
|
||||
if @base_timer > 0 && @timer == 0
|
||||
@timer = @base_timer
|
||||
end
|
||||
|
||||
::loop do
|
||||
if @base_timer > 0 && @timer == 0
|
||||
@timer = @base_timer
|
||||
end
|
||||
|
||||
yield wait_event &block
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@ class IPC::JSON
|
|||
end
|
||||
end
|
||||
|
||||
class IPC::Connection
|
||||
class IPC::Context
|
||||
def send(message : IPC::JSON)
|
||||
send message.type.to_u8, message.to_json
|
||||
end
|
||||
|
|
Reference in New Issue