Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return current Unix timestamp
<?php time(): int
<?php     protected function shouldConfirmPassword($request, $passwordTimeoutSeconds = null)

    {

        $confirmedAt = time() - $request->session()->get('auth.password_confirmed_at', 0);



        return $confirmedAt > ($passwordTimeoutSeconds ?? $this->passwordTimeout);

    }
<?php             'failed_jobs' => 0,

            'failed_job_ids' => '[]',

            'options' => $this->serialize($batch->options),

            'created_at' => time(),

            'cancelled_at' => null,

            'finished_at' => null,

        ]);
<?php     public function markAsFinished(string $batchId)

    {

        $this->connection->table($this->table)->where('id', $batchId)->update([

            'finished_at' => time(),

        ]);

    }
<?php     public function cancel(string $batchId)

    {

        $this->connection->table($this->table)->where('id', $batchId)->update([

            'cancelled_at' => time(),

            'finished_at' => time(),

        ]);

    }
<?php     {

        $this->connection->table($this->table)->where('id', $batchId)->update([

            'cancelled_at' => time(),

            'finished_at' => time(),

        ]);

    }
<?php             'failed_jobs' => 0,

            'failed_job_ids' => [],

            'options' => $this->serialize($batch->options ?? []),

            'created_at' => time(),

            'cancelled_at' => null,

            'finished_at' => null,

        ];
<?php         ];



        if (! is_null($this->ttl)) {

            $batch[$this->ttlAttribute] = time() + $this->ttl;

        }



        $this->dynamoDbClient->putItem([
<?php             ],

            'UpdateExpression' => $update,

            'ExpressionAttributeValues' => array_filter([

                ':timestamp' => ['N' => (string) time()],

                ':ttl' => array_filter(['N' => $this->getExpiryTime()]),

            ]),

            'ExpressionAttributeNames' => $this->ttlExpressionAttributeName(),
<?php             ],

            'UpdateExpression' => $update,

            'ExpressionAttributeValues' => array_filter([

                ':timestamp' => ['N' => (string) time()],

                ':ttl' => array_filter(['N' => $this->getExpiryTime()]),

            ]),

            'ExpressionAttributeNames' => $this->ttlExpressionAttributeName(),
<?php     protected function getExpiryTime(): ?string

    {

        return is_null($this->ttl) ? null : (string) (time() + $this->ttl);

    }
<?php     {

        return class_exists(Carbon::class)

            ? Carbon::now()->timestamp

            : time();

    }
<?php     public function block($timeout, $callback = null, $sleep = 250)

    {

        $starting = time();



        $id = Str::random(20);
<?php         $id = Str::random(20);



        while (! $slot = $this->acquire($id)) {

            if (time() - $timeout >= $starting) {

                throw new LimiterTimeoutException;

            }
<?php     public function block($timeout, $callback = null, $sleep = 750)

    {

        $starting = time();



        while (! $this->acquire()) {

            if (time() - $timeout >= $starting) {
<?php         $starting = time();



        while (! $this->acquire()) {

            if (time() - $timeout >= $starting) {

                throw new LimiterTimeoutException;

            }