Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
5
Task/Sleep/OCaml/sleep-1.ocaml
Normal file
5
Task/Sleep/OCaml/sleep-1.ocaml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#load "unix.cma";;
|
||||
let seconds = read_int ();;
|
||||
print_endline "Sleeping...";;
|
||||
Unix.sleep seconds;; (* number is integer in seconds *)
|
||||
print_endline "Awake!";;
|
||||
7
Task/Sleep/OCaml/sleep-2.ocaml
Normal file
7
Task/Sleep/OCaml/sleep-2.ocaml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#load "unix.cma";;
|
||||
#directory "+threads";;
|
||||
#load "threads.cma";;
|
||||
let seconds = read_float ();;
|
||||
print_endline "Sleeping...";;
|
||||
Thread.delay seconds;; (* number is in seconds ... but accepts fractions *)
|
||||
print_endline "Awake!";;
|
||||
Loading…
Add table
Add a link
Reference in a new issue