vm_newTaskCtx: (ctx Context, onUpdate func(int64, int64)) TaskCtx
(vm *VM, args Values)
| 37 | |
| 38 | // vm_newTaskCtx: (ctx Context, onUpdate func(int64, int64)) TaskCtx |
| 39 | func vm_newTaskCtx(vm *VM, args Values) any { |
| 40 | ctx := GetContext(args.Get(0).Raw()) |
| 41 | onUpdate := args.Get(1) |
| 42 | if onUpdate.IsNil() { |
| 43 | onUpdate = nil |
| 44 | } |
| 45 | return NewTaskCtx(vm, &scriptTaskCtx{ctx, onUpdate, 0, 0, sync.Mutex{}}) |
| 46 | } |
| 47 | |
| 48 | // vm_sleep: (t time.Duration) |
| 49 | func vm_sleep(vm *VM, args Values) any { |
nothing calls this directly
no test coverage detected