XPSPL\idle\Time::set_time PHP Method

set_time() public method

Sets the time.
public set_time ( integer $time )
$time integer Length of time.
    public function set_time($time)
    {
        switch ($this->_instruction) {
            case TIME_SECONDS:
                $this->_stop_time = $time + time();
                break;
            case TIME_MILLISECONDS:
                $this->_stop_time = $time + milliseconds();
                break;
            case TIME_MICROSECONDS:
                // $this->_stop_time = (($time * 0.000001) - XPSPL_AVERAGE_LOOPTIME) + microtime(true);
                $this->_stop_time = $time * 1.0E-6 + microtime(true);
                break;
                // case TIME_NANOSECONDS:
                //     $this->_stop_time = ($time)
        }
    }