diff options
author | Vincent LE GOFF <g_n_s@hotmail.fr> | 2019-04-08 22:22:40 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-04-08 16:22:40 -0400 |
commit | 734cf781c6e606a8a836863a391c94cf4fad22d7 (patch) | |
tree | d55d5212bdeedf4b9b1e53893478489ec960551a /cli/isolate_state.rs | |
parent | f7fdb90fd51e340ea598c055bb3573d3cdfbdaa8 (diff) |
Allow high precision performance.now() (#1977)
Diffstat (limited to 'cli/isolate_state.rs')
-rw-r--r-- | cli/isolate_state.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/isolate_state.rs b/cli/isolate_state.rs index 500cdd7d7..313f4f6ce 100644 --- a/cli/isolate_state.rs +++ b/cli/isolate_state.rs @@ -17,6 +17,7 @@ use std::env; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::Arc; use std::sync::Mutex; +use std::time::Instant; pub type WorkerSender = async_mpsc::Sender<Buf>; pub type WorkerReceiver = async_mpsc::Receiver<Buf>; @@ -51,6 +52,7 @@ pub struct IsolateState { pub global_timer: Mutex<GlobalTimer>, pub workers: Mutex<UserWorkerTable>, pub is_worker: bool, + pub start_time: Instant, } impl IsolateState { @@ -73,6 +75,7 @@ impl IsolateState { global_timer: Mutex::new(GlobalTimer::new()), workers: Mutex::new(UserWorkerTable::new()), is_worker, + start_time: Instant::now(), } } |