Verse Library verse

04 Fragment

Implements a timed loop that pauses each cycle, decrements a counter, and exits when the threshold is reached.

verse-library/verse-concurrency-async-race-state-machines/04-fragment.verse

loop:
    Sleep(1.0)              # yield once per second
    set TimeLeft -= 1
    if (TimeLeft <= 0):
        break              # leave the loop

Comments

    Sign in to vote, comment, or suggest an edit. Sign in