Anonymous user
Events: Difference between revisions
Replaced "cpuTime" by "getTime" to get elapsed time and take sleeping time in account.
(Updated to compile with Nim 1.4: replaced "wait x" by "wait(addr x)".) |
(Replaced "cpuTime" by "getTime" to get elapsed time and take sleeping time in account.) |
||
Line 703:
<lang nim>import locks
from os import sleep
from strformat import fmt
Line 714:
proc waiting {.thread.} =
echo "spawned waiting proc"
let start =
cond.wait lock
echo fmt"thread ended after waiting
proc main =
Line 737:
spawned waiting proc
send signal/event notification
thread ended after waiting
=={{header|Oforth}}==
|