aboutsummaryrefslogtreecommitdiff
path: root/main.nim
diff options
context:
space:
mode:
authoreuxane2024-11-24 17:17:02 +0100
committereuxane2024-11-24 17:17:02 +0100
commitece6c54f1b4db27abac52ee3c627f619d1090544 (patch)
treef59c3b8f15e7f4f7ebd5521969637beae4c26025 /main.nim
parenta2d15bdd78f071549d46aa6ac5467a8a8cf6ebbd (diff)
downloadtickwatch-ece6c54f1b4db27abac52ee3c627f619d1090544.tar.gz
ping: add hostname resolution
Diffstat (limited to 'main.nim')
-rw-r--r--main.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.nim b/main.nim
index 04a81f1..be77427 100644
--- a/main.nim
+++ b/main.nim
@@ -70,7 +70,7 @@ proc main() =
70 of "max": max = parseInt(val) 70 of "max": max = parseInt(val)
71 71
72 of "ping": 72 of "ping":
73 let targetIp = parseIpAddress(val) 73 let targetIp = resolve(val)
74 let mon = initPingMonitor(targetIp, procIdent()) 74 let mon = initPingMonitor(targetIp, procIdent())
75 probe = (timeout: Duration) => mon.ping(timeout).inMilliseconds.int 75 probe = (timeout: Duration) => mon.ping(timeout).inMilliseconds.int
76 76