Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
9
Task/Sleep/Aime/sleep.aime
Normal file
9
Task/Sleep/Aime/sleep.aime
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
o_text("Sleeping...\n");
|
||||
|
||||
# Sleep X seconds
|
||||
sleep(atoi(argv(1)));
|
||||
|
||||
# Sleep X microseconds
|
||||
#usleep(atoi(argv(1)));
|
||||
|
||||
o_text("Awake!\n");
|
||||
4
Task/Sleep/Emacs-Lisp/sleep-1.l
Normal file
4
Task/Sleep/Emacs-Lisp/sleep-1.l
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
(let ((seconds (read-number "Time in seconds: ")))
|
||||
(message "Sleeping ...")
|
||||
(sleep-for seconds)
|
||||
(message "Awake!"))
|
||||
1
Task/Sleep/Emacs-Lisp/sleep-2.l
Normal file
1
Task/Sleep/Emacs-Lisp/sleep-2.l
Normal file
|
|
@ -0,0 +1 @@
|
|||
(string-to-number (read-string "Time in seconds: "))
|
||||
8
Task/Sleep/FBSL/sleep.fbsl
Normal file
8
Task/Sleep/FBSL/sleep.fbsl
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#APPTYPE CONSOLE
|
||||
DIM %msec
|
||||
PRINT "Milliseconds to sleep: ";
|
||||
%msec = FILEGETS(stdin, 10)
|
||||
PRINT "Sleeping..."
|
||||
SLEEP(%msec)
|
||||
PRINT "Awake!"
|
||||
PAUSE
|
||||
12
Task/Sleep/Lhogho/sleep.lhogho
Normal file
12
Task/Sleep/Lhogho/sleep.lhogho
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
make "Void "V0
|
||||
make "Long "U4
|
||||
make "kernel32_handle libload "kernel32.dll
|
||||
to Sleep :dwMilliseconds
|
||||
end
|
||||
external "Sleep [ Void Sleep Long] :kernel32_handle
|
||||
|
||||
to millisleep :n
|
||||
print [Sleeping...]
|
||||
Sleep :n ; units: 1/1000th of a second
|
||||
print [Awake.]
|
||||
end
|
||||
10
Task/Sleep/Logtalk/sleep-1.logtalk
Normal file
10
Task/Sleep/Logtalk/sleep-1.logtalk
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
:- object(sleep).
|
||||
|
||||
:- public(how_long/1).
|
||||
|
||||
how_long(Seconds) :-
|
||||
write('Sleeping ...'), nl,
|
||||
thread_sleep(Seconds),
|
||||
write('... awake!'), nl.
|
||||
|
||||
:- end_object.
|
||||
4
Task/Sleep/Logtalk/sleep-2.logtalk
Normal file
4
Task/Sleep/Logtalk/sleep-2.logtalk
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
| ?- sleep::how_long(5).
|
||||
Sleeping ...
|
||||
... awake!
|
||||
yes
|
||||
14
Task/Sleep/Nemerle/sleep.nemerle
Normal file
14
Task/Sleep/Nemerle/sleep.nemerle
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using System.Console;
|
||||
using System.Threading.Thread; // this is where the Sleep() method comes from
|
||||
|
||||
module Zzzz
|
||||
{
|
||||
Main() : void
|
||||
{
|
||||
def nap_time = Int32.Parse(ReadLine());
|
||||
WriteLine("Sleeping...");
|
||||
Sleep(nap_time); // parameter is time in milliseconds
|
||||
WriteLine("Awake!");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue