Impl Clock trait in bindings

This commit is contained in:
Avinash Sajjanshetty 2025-04-06 23:09:00 +05:30
parent 2873c36b31
commit 3543e83b91
3 changed files with 35 additions and 15 deletions

View file

@ -4,6 +4,7 @@ use std::cell::RefCell;
use std::rc::Rc;
use std::sync::Arc;
use limbo_core::{Clock, Instant};
use napi::{Env, JsUnknown, Result as NapiResult};
use napi_derive::napi;
@ -152,6 +153,12 @@ impl limbo_core::DatabaseStorage for DatabaseFile {
struct IO {}
impl Clock for IO {
fn now(&self) -> Instant {
todo!()
}
}
impl limbo_core::IO for IO {
fn open_file(
&self,
@ -169,8 +176,4 @@ impl limbo_core::IO for IO {
fn generate_random_number(&self) -> i64 {
todo!();
}
fn get_current_time(&self) -> String {
todo!();
}
}