Login
7 branches 0 tags
Ben (X13/Arch) [closure-caller] -> [closure/caller] and [closure-parent] -> [closure/parent] 7a59dbf 3 years ago 573 Commits
nujel / tests / clock.nuj
#!/usr/bin/env nujel

[def next-tick [+ [time/milliseconds] 1000]]
[def tick-tock #t]
[while #t
       [while [< [time/milliseconds] next-tick]]
       [if tick-tock
           [println "Tick"]
           [println "Tock"]]
       [set! tick-tock [not tick-tock]]
       [set! next-tick [+ [time/milliseconds] 1000]]]