diff options
Diffstat (limited to 'crates/shirabe-external-packages')
| -rw-r--r-- | crates/shirabe-external-packages/src/symfony/console/helper/progress_bar.rs | 4 | ||||
| -rw-r--r-- | crates/shirabe-external-packages/src/symfony/process/process.rs | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/console/helper/progress_bar.rs b/crates/shirabe-external-packages/src/symfony/console/helper/progress_bar.rs index d9d3fd6..1cd50ac 100644 --- a/crates/shirabe-external-packages/src/symfony/console/helper/progress_bar.rs +++ b/crates/shirabe-external-packages/src/symfony/console/helper/progress_bar.rs @@ -391,7 +391,7 @@ impl ProgressBar { } else { 0.0 }; - let time_interval = shirabe_php_shim::microtime(true) - self.last_write_time; + let time_interval = shirabe_php_shim::microtime() - self.last_write_time; // Draw regardless of other limits if self.max == step { @@ -534,7 +534,7 @@ impl ProgressBar { } self.previous_message = Some(original_message); - self.last_write_time = shirabe_php_shim::microtime(true); + self.last_write_time = shirabe_php_shim::microtime(); self.output .borrow() diff --git a/crates/shirabe-external-packages/src/symfony/process/process.rs b/crates/shirabe-external-packages/src/symfony/process/process.rs index 2466613..fe7b06c 100644 --- a/crates/shirabe-external-packages/src/symfony/process/process.rs +++ b/crates/shirabe-external-packages/src/symfony/process/process.rs @@ -318,7 +318,7 @@ impl Process { } self.reset_process_data(); - self.starttime = Some(php::microtime(true)); + self.starttime = Some(php::microtime()); self.last_output_time = self.starttime; let has_callback = callback.is_some(); self.callback = Some(self.build_callback(callback)); @@ -847,14 +847,14 @@ impl Process { /// Stops the process. pub fn stop(&mut self, timeout: f64, signal: Option<i64>) -> Option<i64> { - let timeout_micro = php::microtime(true) + timeout; + let timeout_micro = php::microtime() + timeout; if self.is_running() { // given SIGTERM may not be defined and that "proc_terminate" uses the constant value // and not the constant itself, we use the same here let _ = self.do_signal(15, false); loop { php::usleep(1000); - if !(self.is_running() && php::microtime(true) < timeout_micro) { + if !(self.is_running() && php::microtime() < timeout_micro) { break; } } @@ -880,7 +880,7 @@ impl Process { /// Adds a line to the STDOUT stream. pub fn add_output(&mut self, line: &str) { - self.last_output_time = Some(php::microtime(true)); + self.last_output_time = Some(php::microtime()); php::fseek3(self.stdout.clone(), 0, php::SEEK_END); php::fwrite(self.stdout.clone(), line, line.len() as i64); @@ -889,7 +889,7 @@ impl Process { /// Adds a line to the STDERR stream. pub fn add_error_output(&mut self, line: &str) { - self.last_output_time = Some(php::microtime(true)); + self.last_output_time = Some(php::microtime()); php::fseek3(self.stderr.clone(), 0, php::SEEK_END); php::fwrite(self.stderr.clone(), line, line.len() as i64); @@ -1039,7 +1039,7 @@ impl Process { } if let Some(timeout) = self.timeout { - if timeout < php::microtime(true) - self.starttime.unwrap_or(0.0) { + if timeout < php::microtime() - self.starttime.unwrap_or(0.0) { self.stop(0.0, None); return Err(ProcessTimedOutException::new( @@ -1051,7 +1051,7 @@ impl Process { } if let Some(idle_timeout) = self.idle_timeout { - if idle_timeout < php::microtime(true) - self.last_output_time.unwrap_or(0.0) { + if idle_timeout < php::microtime() - self.last_output_time.unwrap_or(0.0) { self.stop(0.0, None); return Err(ProcessTimedOutException::new( |
