mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-25 03:54:21 +01:00
fix clock implementation for OPFS IO
This commit is contained in:
@@ -140,7 +140,11 @@ impl Opfs {
|
||||
|
||||
impl Clock for Opfs {
|
||||
fn now(&self) -> Instant {
|
||||
Instant { secs: 0, micros: 0 } // TODO
|
||||
let now = chrono::Local::now();
|
||||
Instant {
|
||||
secs: now.timestamp(),
|
||||
micros: now.timestamp_subsec_micros(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
|
||||
#[cfg(feature = "browser")]
|
||||
pub mod browser;
|
||||
#[cfg(feature = "browser")]
|
||||
use crate::browser::opfs;
|
||||
|
||||
use napi::bindgen_prelude::*;
|
||||
use napi::{Env, Task};
|
||||
|
||||
Reference in New Issue
Block a user