Debian Codegraph @

examples/basic/tick2.ck

raw
1 // tick tock
2
3 // wait until the start of the next second
4 second - (now % second) => now;
5
6 // infinite time loop
7 while( true )
8 {
9 // print now in seconds
10 <<< "tick:", (now / second) $ int, "seconds" >>>;
11 1::second => now;
12 }