diff options
author | Aram Drevekenin <aram@poor.dev> | 2023-08-25 19:47:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-25 19:47:23 +0200 |
commit | 90e93d64bda7c00b70b7aa1c5dccf84358cb2dea (patch) | |
tree | bbd3c37575295dc97ba8b88537cdce56d13b39f5 /zellij-server | |
parent | 07433eb6dcdb39746b3ce19eae1bd8b04efc97c7 (diff) |
fix(plugins): remove protobuf duplications (#2729)
* fix(plugins): remove protobuf duplications
* style(fmt): rustfmt
Diffstat (limited to 'zellij-server')
-rw-r--r-- | zellij-server/src/plugins/zellij_exports.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zellij-server/src/plugins/zellij_exports.rs b/zellij-server/src/plugins/zellij_exports.rs index 16943dbb0..c00d1ea50 100644 --- a/zellij-server/src/plugins/zellij_exports.rs +++ b/zellij-server/src/plugins/zellij_exports.rs @@ -460,7 +460,7 @@ fn switch_tab_to(env: &ForeignFunctionEnv, tab_idx: u32) { .non_fatal(); } -fn set_timeout(env: &ForeignFunctionEnv, secs: f32) { +fn set_timeout(env: &ForeignFunctionEnv, secs: f64) { // There is a fancy, high-performance way to do this with zero additional threads: // If the plugin thread keeps a BinaryHeap of timer structs, it can manage multiple and easily `.peek()` at the // next time to trigger in O(1) time. Once the wake-up time is known, the `wasm` thread can use `recv_timeout()` @@ -477,7 +477,7 @@ fn set_timeout(env: &ForeignFunctionEnv, secs: f32) { // TODO: we should really use an async task for this thread::spawn(move || { let start_time = Instant::now(); - thread::sleep(Duration::from_secs_f32(secs)); + thread::sleep(Duration::from_secs_f64(secs)); // FIXME: The way that elapsed time is being calculated here is not exact; it doesn't take into account the // time it takes an event to actually reach the plugin after it's sent to the `wasm` thread. let elapsed_time = Instant::now().duration_since(start_time).as_secs_f64(); |