From a2436fd78013e86a2f974e3da4a946bbdfbe1b99 Mon Sep 17 00:00:00 2001 From: Joel-Jensen <60270137+Joel-Jensen@users.noreply.github.com> Date: Wed, 27 Mar 2024 17:58:39 +0100 Subject: [PATCH] Display correct elapsed time with Roadrunner (#865) * $elapsed is always in ms * Revert "$elapsed is always in ms" This reverts commit 795238d2dcf43479083c4cb919c4e9ae500ae9a9. * Return elapsed as is if integer --- src/Commands/StartRoadRunnerCommand.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Commands/StartRoadRunnerCommand.php b/src/Commands/StartRoadRunnerCommand.php index 224025b8f..cf12bace6 100644 --- a/src/Commands/StartRoadRunnerCommand.php +++ b/src/Commands/StartRoadRunnerCommand.php @@ -258,6 +258,10 @@ protected function calculateElapsedTime(string $elapsed): float return mb_substr($elapsed, 0, -2) * 0.001; } + if (filter_var($elapsed, FILTER_VALIDATE_INT) !== false) { + return $elapsed; + } + return (float) $elapsed * 1000; }