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