mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-03 17:48:17 +00:00
Impl Clock trait in bindings
This commit is contained in:
parent
2873c36b31
commit
3543e83b91
3 changed files with 35 additions and 15 deletions
|
@ -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!();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue