Handle a signal: Difference between revisions

Nimrod -> Nim
(Nimrod -> Nim)
Line 603:
(sleep 500))</lang>
 
=={{header|NimrodNim}}==
<lang nimrodnim>import times, os, strutils
 
let t = epochTime()
Line 618:
echo n</lang>
Or if you prefer an exception to be thrown on SIGINT:
<lang nimrodnim>import times, os, strutils
 
type EKeyboardInterrupt = object of Exception
Anonymous user