Mercurial Hosting > luan
changeset 1104:772d16c89056
add Thread.sleep()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 19 Jun 2017 16:06:12 -0600 |
parents | 1fcf5c25b3bd |
children | 27bf094f0ae3 |
files | src/luan/modules/Thread.luan src/luan/modules/ThreadLuan.java |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/luan/modules/Thread.luan Sun Jun 11 19:19:08 2017 -0600 +++ b/src/luan/modules/Thread.luan Mon Jun 19 16:06:12 2017 -0600 @@ -9,6 +9,7 @@ Thread.fork = ThreadLuan.fork Thread.schedule = ThreadLuan.schedule +Thread.sleep = ThreadLuan.sleep Thread.global = {} -- shared across threads
--- a/src/luan/modules/ThreadLuan.java Sun Jun 11 19:19:08 2017 -0600 +++ b/src/luan/modules/ThreadLuan.java Mon Jun 19 16:06:12 2017 -0600 @@ -106,4 +106,9 @@ return val==null ? null : val.v; } } + + + public static void sleep(long millis) throws InterruptedException { + Thread.sleep(millis); + } }