mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-24 14:11:32 +00:00
Added missing functions for pyodide
Since Pyodide is focused on running on desktop, this pull-request lacks Javascript runtime functions. It also sorted alphabetically some functions
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
use super::utils::{copy_cstr_into_wasm, write_to_buf};
|
||||
use libc::{c_char, c_int};
|
||||
// use libc::{c_char, c_int, clock_getres, clock_settime};
|
||||
use std::mem;
|
||||
use std::time::SystemTime;
|
||||
|
||||
@ -69,6 +70,12 @@ pub fn _gettimeofday(ctx: &mut Ctx, tp: c_int, tz: c_int) -> c_int {
|
||||
0
|
||||
}
|
||||
|
||||
pub fn _clock_getres(_ctx: &mut Ctx, _clk_id: i32, _tp: i32) -> i32 {
|
||||
debug!("emscripten::_clock_getres");
|
||||
// clock_getres(clk_id, tp)
|
||||
0
|
||||
}
|
||||
|
||||
/// emscripten: _clock_gettime
|
||||
#[allow(clippy::cast_ptr_alignment)]
|
||||
pub fn _clock_gettime(ctx: &mut Ctx, clk_id: clockid_t, tp: c_int) -> c_int {
|
||||
@ -103,6 +110,12 @@ pub fn _clock_gettime(ctx: &mut Ctx, clk_id: clockid_t, tp: c_int) -> c_int {
|
||||
0
|
||||
}
|
||||
|
||||
pub fn _clock_settime(_ctx: &mut Ctx, _clk_id: i32, _tp: i32) -> i32 {
|
||||
debug!("emscripten::_clock_settime");
|
||||
// clock_settime(clk_id, tp)
|
||||
0
|
||||
}
|
||||
|
||||
/// emscripten: ___clock_gettime
|
||||
pub fn ___clock_gettime(ctx: &mut Ctx, clk_id: clockid_t, tp: c_int) -> c_int {
|
||||
debug!("emscripten::___clock_gettime {} {}", clk_id, tp);
|
||||
|
Reference in New Issue
Block a user