1
1
mirror of https://github.com/tweag/asterius.git synced 2024-09-11 08:55:32 +03:00
This commit is contained in:
Cheng Shao 2020-10-19 16:12:41 +00:00
parent 79a4978feb
commit 6b37fb5532
2 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,7 @@
#include <time.h>
#include "HsFFI.h"
int ghczuwrapperZC0ZCbaseZCSystemziCPUTimeziPosixziClockGetTimeZCclockzugetres(clockid_t clk_id, struct timespec *res) {
int ghczuwrapperZC1ZCbaseZCSystemziCPUTimeziPosixziClockGetTimeZCclockzugetres(clockid_t clk_id, struct timespec *res) {
return clock_getres(clk_id, res);
}

View File

@ -5,6 +5,11 @@ export class WASI {
Object.freeze(this);
}
clock_res_get(id, resolution_p) {
this.components.memory.i64Store(resolution_p, 1);
return 0;
}
clock_time_get(id, precision, time_p) {
switch (id) {
case 1: {