2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-03-31 18:53:22 +00:00

fix: make timeout() blocking

may or may not be temporary
This commit is contained in:
sammyette 2021-09-18 22:48:28 -04:00
parent 2b5e65e47a
commit 2ef2998279
No known key found for this signature in database
GPG Key ID: 50EE40A2809851F5

3
lua.go
View File

@ -152,7 +152,8 @@ func hshgoroutine(gofunc func()) {
func hshtimeout(timeoutfunc func(), ms int) {
timeout := time.Duration(ms) * time.Millisecond
time.AfterFunc(timeout, timeoutfunc)
time.Sleep(timeout)
timeoutfunc()
}
func hshinterval(L *lua.LState) int {