mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: coroutines (part 2)
This commit is contained in:
@ -11,7 +11,7 @@ import time
|
||||
#include "photonwrapper.h"
|
||||
|
||||
fn C.photon_init_default() int
|
||||
fn C.photon_thread_create11(f voidptr)
|
||||
fn C.photon_thread_create(f voidptr)
|
||||
fn C.photon_sleep_s(n int)
|
||||
fn C.photon_sleep_ms(n int)
|
||||
|
||||
@ -19,3 +19,8 @@ fn C.photon_sleep_ms(n int)
|
||||
pub fn sleep(duration time.Duration) {
|
||||
C.photon_sleep_ms(duration.milliseconds())
|
||||
}
|
||||
|
||||
// init needs to be run
|
||||
pub fn initialize() int {
|
||||
return C.photon_init_default()
|
||||
}
|
||||
|
Reference in New Issue
Block a user