From: Ralph Ronnquist Date: Mon, 8 May 2023 02:29:57 +0000 (+1000) Subject: correction X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=7a99f2ed7cfe55f3aa69560b31c055ce45fe1f0c;p=rrq%2Frrqforth.git correction --- diff --git a/examples/uenventlog.f b/examples/uenventlog.f index acf6222..c2d1341 100755 --- a/examples/uenventlog.f +++ b/examples/uenventlog.f @@ -19,6 +19,10 @@ SYSTEM DEFINITIONS " ROT IF TELL NL EMIT 1 EXIT THEN 2DROP ; +: time ( -- s ; seconds since epoch ) + 0 SYS_TIME +; + HEX 100 DECIMAL CONSTANT MSG_WAITALL HEX 80002 DECIMAL CONSTANT SOCK_DGRAM|SOCK_CLOEXEC 15 CONSTANT NETLINK_KOBJECT_UEVENT @@ -45,7 +49,7 @@ SYS_BIND DIE" Failed to bind" BEGIN NL-SOCKET @ RECV-BUFFER NL_MAX_PAYLOAD MSG_WAITALL 0 0 SYS_RECVFROM DUP 0 > - IF DROP RECV-BUFFER DUP STRLEN TELL NL EMIT + IF DROP time . SP EMIT RECV-BUFFER DUP STRLEN TELL NL EMIT ELSE S" ** Error: " TELL . NL EMIT THEN AGAIN