mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-16 16:20:49 +00:00
only support clock id 0
This commit is contained in:
parent
4813047d37
commit
2107df3c99
@ -40,7 +40,11 @@ pub extern "C" fn _clock_gettime(clk_id: c_int, tp: c_int, instance: &mut Instan
|
||||
tv_nsec: i32,
|
||||
}
|
||||
|
||||
let timespec = time::get_time();
|
||||
let timespec = match clk_id {
|
||||
0 => time::get_time(),
|
||||
1 => panic!("Monotonic clock is not supported."),
|
||||
_ => panic!("Clock is not supported."),
|
||||
};
|
||||
|
||||
unsafe {
|
||||
let timespec_struct_ptr = instance.memory_offset_addr(0, tp as _) as *mut GuestTimeSpec;
|
||||
|
Loading…
x
Reference in New Issue
Block a user