Skip to content

Commit 11db50c

Browse files
committed
FIXES
1 parent f986f76 commit 11db50c

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

runtime/wasm/runtime.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@
392392
return caml_alloc_times(t.user / 1e6, t.system / 1e6);
393393
} else {
394394
var t = performance.now() / 1000;
395-
return caml_alloc_times(t, t);
395+
return caml_alloc_times(t, 0);
396396
}
397397
},
398398
gmtime: (t) => {

runtime/wasm/sys.wat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,11 @@
288288
(local.set $buffer (call $get_buffer))
289289
(local.set $res
290290
(call $clock_time_get (i32.const 2) (i64.const 1) (local.get $buffer)))
291+
(if (i32.eq (local.get $res) (i32.const 8))
292+
(then
293+
(local.set $res
294+
(call $clock_time_get
295+
(i32.const 0) (i64.const 1) (local.get $buffer)))))
291296
(if (local.get $res)
292297
(then
293298
(call $caml_handle_sys_error

runtime/wasm/unix.wat

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,11 @@
426426
(local.set $res
427427
(call $clock_time_get
428428
(i32.const 2) (i64.const 1) (local.get $buffer)))
429+
(if (i32.eq (local.get $res) (i32.const 8))
430+
(then
431+
(local.set $res
432+
(call $clock_time_get
433+
(i32.const 0) (i64.const 1) (local.get $buffer)))))
429434
(if (local.get $res)
430435
(then
431436
(call $caml_unix_error

0 commit comments

Comments
 (0)