Skip to content

Commit 72e94b1

Browse files
show state too
1 parent 6bd47fd commit 72e94b1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

base/asyncevent.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ mutable struct Timer
118118
end
119119

120120
function show(io::IO, t::Timer)
121-
print(io, "Timer (timeout: $(t.timeout), interval: $(t.interval)) @0x$(string(convert(UInt, pointer_from_objref(t)), base = 16, pad = Sys.WORD_SIZE>>2))")
121+
state = isopen(t) ? "open" : "closed"
122+
print(io, "Timer ($state, timeout: $(t.timeout), interval: $(t.interval)) @0x$(string(convert(UInt, pointer_from_objref(t)), base = 16, pad = Sys.WORD_SIZE>>2))")
122123
end
123124

124125
unsafe_convert(::Type{Ptr{Cvoid}}, t::Timer) = t.handle

0 commit comments

Comments
 (0)