Created
December 15, 2014 20:22
-
-
Save JobLeonard/42c3d430a3b0a848d79e to your computer and use it in GitHub Desktop.
Sleepsort in Céu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SleepSorter with | |
var int t; | |
do | |
await (t)ms; | |
_printf("%d ", t); | |
end | |
par/or do | |
var SleepSorter[100000] sorter with | |
this.t = (_rand()%100); | |
end; | |
await FOREVER; | |
with | |
_printf("\n"); | |
every 1ms do | |
_printf("\n"); | |
end | |
with | |
await 101ms; | |
end | |
escape 0; |
Hah, thanks! Apparently Gist doesn't send a notification if there's a comment, didn't see this before :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry, couldn't resist suggesting modifications :)