Checkpoint synchronization: Difference between revisions

m
→‎{{header|J}}: more hygiene
m (→‎{{header|J}}: consistent use of J's prompt)
m (→‎{{header|J}}: more hygiene)
Line 1,610:
ts=: 6!:0 NB. timestamp
dl=: 6!:3 NB. delay
 
{{r=.EMPTY for. i.y do. dl 1[ r=.r,3}.ts'' end. r}} t. ''"0(3 5)
┌────────────┬────────────┐
Line 1,620:
└────────────┴────────────┘</lang>
 
Here, we had set up a loop which periodically tracked the time, and waited a second each time through the loop, and repeated the loopnloop a number of times specified at task startup. We ran two tasks, to demonstrate that they were running side-by-side.
 
=={{header|Java}}==
6,962

edits