Thesis TimeSpan Installation composer require thesis/time-span Usage use Thesis\Time\TimeSpan; $delay = TimeSpan::fromSeconds(25.123); echo $delay->toMilliseconds(); // 25123