Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return current Unix timestamp with microseconds
microtime(bool $as_float false): string|float
        $this->components->task($description, function () use ($event) {

            
$this->dispatcher->dispatch(new ScheduledTaskStarting($event));



            
$start microtime(true);



            try {

                
$event->run($this->laravel);
                $this->dispatcher->dispatch(new ScheduledTaskFinished(

                    
$event,

                    
round(microtime(true) - $start2)

                ));



                
$this->eventsRan true;
        $this->output->write("  $description "false$verbosity);



        
$startTime microtime(true);



        
$result false;
            throw $e;

        } finally {

            
$runTime $task

                
? (' '.number_format((microtime(true) - $startTime) * 10002).'ms')

                : 
'';



            
$runTimeWidth mb_strlen($runTime);
        $this->reconnectIfMissingConnection();



        
$start microtime(true);
    protected function getElapsedTime($start)

    {

        return 
round((microtime(true) - $start) * 10002);

    }
    protected function writeOutput(Job $job$status)

    {

        if (
$status == 'starting') {

            
$this->latestStartedAt microtime(true);

            
$this->latestStatus $status;



            
$formattedStartedAt Carbon::now()->format('Y-m-d H:i:s');
            $this->output->write("  <fg=gray>{$formattedStartedAt}</> {$job->resolveName()}");

        }



        
$runTime number_format((microtime(true) - $this->latestStartedAt) * 10002).'ms';

        
$dots max(terminal()->width() - mb_strlen($job->resolveName()) - mb_strlen($runTime) - 310);



        
$this->output->write(' '.str_repeat('<fg=gray>.</>'$dots));
    public function command($method, array $parameters = [])

    {

        
$start microtime(true);



        
$result $this->client->{$method}(...$parameters);
        $result $this->client->{$method}(...$parameters);



        
$time round((microtime(true) - $start) * 10002);



        if (isset(
$this->events)) {

            
$this->event(new CommandExecuted($method$parameters$time$this));
    public function acquire()

    {

        
$results $this->redis->eval(

            
$this->luaScript(), 1$this->namemicrotime(true), time(), $this->decay$this->maxLocks

        
);



        
$this->decaysAt $results[1];
    public function tooManyAttempts()

    {

        [
$this->decaysAt$this->remaining] = $this->redis->eval(

            
$this->tooManyAttemptsLuaScript(), 1$this->namemicrotime(true), time(), $this->decay$this->maxLocks

        
);



        return 
$this->remaining <= 0;
    public function testRetry()

    {

        
$startTime microtime(true);



        
$attempts retry(2, function ($attempts) {

            if (
$attempts 1) {
        $this->assertEquals(2$attempts);




        
$this->assertEqualsWithDelta(0.1microtime(true) - $startTime0.02);

    }



    public function 
testRetryWithPassingSleepCallback()
    public function testRetryWithPassingSleepCallback()

    {

        
$startTime microtime(true);



        
$attempts retry(3, function ($attempts) {

            if (
$attempts 2) {