# decalog/4.4.0/includes/libraries/lock/exception/TimeoutException.php

DecaLog, version 4.4.0. 30 lines.

- Page: https://pluginprobe.com/plugins/decalog/4.4.0/code/includes/libraries/lock/exception/TimeoutException.php
- Raw: https://pluginprobe.com/plugins/decalog/4.4.0/raw/includes/libraries/lock/exception/TimeoutException.php
- Modified: 2020-09-30T17:31:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/decalog/4.4.0/code/includes/libraries/lock/exception/TimeoutException.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace malkusch\lock\exception;

/**
 * Timeout exception.
 *
 * A timeout has been exceeded exception. Should only be used in contexts where
 * the lock is being acquired.
 *
 * @author Markus Malkusch <markus@malkusch.de>
 * @link bitcoin:1P5FAZ4QhXCuwYPnLZdk3PJsqePbu1UDDA Donations
 * @license WTFPL
 */
class TimeoutException extends LockAcquireException
{
    /**
     * Creates a new instance of the TimeoutException class.
     *
     * @param int $timeout The timeout in seconds.
     * @return self A timeout has been exceeded exception.
     */
    public static function create(int $timeout): self
    {
        return new self(\sprintf('Timeout of %d seconds exceeded.', $timeout));
    }
}

```
