phpmock\functions\FixedMicrotimeFunction::__construct PHP Method

__construct() public method

Set the timestamp.
public __construct ( mixed $timestamp = null )
$timestamp mixed The timestamp, if ommited the current time.
    public function __construct($timestamp = null)
    {
        if (is_null($timestamp)) {
            $this->setMicrotime(\microtime());
        } elseif (is_string($timestamp)) {
            $this->setMicrotime($timestamp);
        } elseif (is_numeric($timestamp)) {
            $this->setMicrotimeAsFloat($timestamp);
        } else {
            throw new \InvalidArgumentException("Timestamp parameter is invalid type.");
        }
    }