Me devuelve las mesas abiertas de cada mozo
@param boolean $microtime microtime desde donde yo quiero tomar omo referencia a la hora de traer las mesas
514709
public function mesas_abiertas( $microtime = 0 ) {
            
            $lastAccess = null;
            $type = 'created';
            if ( $microtime != 0 ) {
            	$type = 'modified';
                $lastAccess = $this->Session->read('lastAccess');


                // setear el nuevo lastAccess
                $nowTime = date('Y-m-d H:i:s', strtotime('now'));
                $this->Session->write('lastAccess', $nowTime );

                // ver las borradas o con checkout
	            $borradas = $this->Mozo->mesasBorradas( null, $lastAccess);
	            if ( !empty($borradas) ) {
		            $mesas['borradas'] = $borradas;
	            }
            }

            $mesas[$type] = $this->Mozo->mesasAbiertas( null, $lastAccess);

            

            
            $this->set('mesasLastUpdatedTime', 1 );
            $this->set('modified', $lastAccess );
            $this->set('mesas', $mesas );
            
        }
959151
public function setTime( $hour, $minute, $second = 0, $microsecond = 0)
    {
        if( $this->isInfinity() ) {
            return $this;
        }
        $this->microseconds = $microsecond ? (int) $microsecond : 0;
        return parent::setTime( $hour, $minute, $second );
    }
451672
public static function getMicrotime()
    {
        list($usec, $sec) = explode(' ', microtime());
        return ((float)$usec + (float)$sec);
    }
534760
static function microtime(): float
    {
        if (self::$now !== null) {
            return (float) self::$now;
        }

        return microtime(true);
    }
510087
public static function get_microtime() {
        list($tps_usec, $tps_sec) = explode(' ', microtime());
        return (float) $tps_usec + (float) $tps_sec;
    }
1344706
protected function _callTimeHandlers()
    {
        foreach ($this->_timehandler as &$handlerinfo) {
            $microtimestamp = microtime(true);
            if ($microtimestamp >= $handlerinfo['lastmicrotimestamp']
                + ($handlerinfo['interval'] / 1000.0)
            ) {
                $callback = $handlerinfo['callback'];
                $handlerinfo['lastmicrotimestamp'] = $microtimestamp;

                $cbstring = (is_array($callback))
                    ? (is_object($callback[0])
                        ? get_class($callback[0])
                        : $callback[0]
                      ) . '->' . $callback[1]
                    : '(anonymous function)';

                if (is_callable($callback)) {
                    $this->log(SMARTIRC_DEBUG_TIMEHANDLER, 'DEBUG_TIMEHANDLER: calling "'.$cbstring.'"',
                        __FILE__, __LINE__
                    );
                    call_user_func($callback, $this);
                } else {
                    $this->log(SMARTIRC_DEBUG_TIMEHANDLER,
                        'DEBUG_TIMEHANDLER: callback is invalid! "'.$cbstring.'"',
                        __FILE__, __LINE__
                    );
                }
            }
        }
    }
864083
public function setInterval(int $seconds, ?int $microseconds = null): void
    {
        if (func_num_args() === 1) {
            $microseconds = $seconds;
            $seconds      = 0;
        }

        Assert::notNull($microseconds, 'Cannot set $microseconds to null. Set to 0 for no microseconds.');
        parent::setInterval($seconds, $microseconds);

        $this->seconds      = $seconds;
        $this->microseconds = $microseconds;
    }
394821
public function convertMicrosecondsToTime($time)
    {
        // Calculating day-ratio;
        // Dividing microseconds per seconds results in the intended value
        $ratio = intval($time / $this->dayLengthInSeconds);

        // If using a different time format, apply ratio
        $timeScale = array_product($this->ranges);

        if ($this->dayLengthInMicroSeconds !== $timeScale) {
            $time = intval(
                ($time * $timeScale) / $this->dayLengthInMicroSeconds
            );
        }

        $len = count($this->ranges);
        $res = array_fill(0, $len, 0);

        for ($i=$len - 1; $i > -1; $i--) {
            $res[$i] = $time % $this->ranges[$i];
            $time = intval($time / $this->ranges[$i]);
        }

        return new TimeObject($res, $this->ranges, $ratio);
    }
838589
private function createDateTime($seconds = null)
    {
        if (null === $seconds) {
            $seconds = time();
        }

        if ($this->mongo instanceof \MongoDB\Client) {
            return new \MongoDB\BSON\UTCDateTime($seconds * 1000);
        }

        return new \MongoDate($seconds);
    }
820097
function milliseconds( $dp = null ){
	 	if( $this->is_running() ){
		 	$now = microtime( false );
		}
		else {
			$now = $this->stopped;
		}
		$started = self::parse_microtime( $this->started );
		$stopped = self::parse_microtime( $now );
		$ms = $stopped - $started;
		if( ! is_null($dp) ){
			$mult = pow( 10, $dp );
			$ms = round( $mult * $ms ) / $mult;
		}
		return $ms;
	 }
1030227
static function parse_microtime( $microtime ){
		list($usec, $sec) = explode( ' ', $microtime ); 
		$ms1 = (float) $usec * 1000;
		$ms2 = (float) $sec  * 1000;
		return $ms1 + $ms2;
	}
996900
private function getCurrentTime()
    {
        list ($msec, $sec) = explode(" ", microtime());
        return (float)$msec + (float)$sec;
    }
65841
final private function getMicrotime() {
	
		list ($msec, $sec) = explode(' ', microtime());
		$time = ((float)$msec + (float)$sec);
		return $time;
		 
	}
677008
static public function microTime($isFormat = true)
    {
        if ($isFormat) {
            list($microSec, $sec) = explode(" ", microtime());
            return Format::datetime($sec) . ' ' . substr($microSec, 2, 6);
        } else {
            return microtime(true);
        }
    }
395805
public static function getIntelligentFormat($microtime, int $precision = null): string
    {
        if (1000000 <= $microtime) {
            $unit = Microtime::SECOND;
            $value = $microtime / Mapper::getFactor($unit);
        } elseif (1000 <= $microtime) {
            $unit = Microtime::MILLISECOND;
            $value = $microtime / Mapper::getFactor($unit);
        } elseif (1 <= $microtime) {
            $unit = Microtime::MICROSECOND;
            $value = $microtime / Mapper::getFactor($unit);
        } elseif (0.001 <= $microtime) {
            $unit = Microtime::NANOSECOND;
            $value = $microtime / Mapper::getFactor($unit);
        } elseif (0.000001 <= $microtime) {
            $unit = Microtime::PICOSECOND;
            $value = $microtime / Mapper::getFactor($unit);
        } else {
            $unit = Microtime::FEMTOSECOND;
            $value = $microtime / Mapper::getFactor($unit);
        }
        if (null !== $precision) {
            $value = \number_format((float) $value, $precision, '.', '');
        }
        return self::valueAndUnitToString($value, $unit);
    }
1203590
public function convertMicrotimeToTokens($microtime)
    {
        $delta = bcsub(microtime(true), $microtime, $this->bcScale);
        return $this->convertSecondsToTokens($delta);
    }
1132061
protected function microTime($time): int
    {
        if ($time === null) {
            return $this->timestampMicro();
        }

        if ($time instanceof \DateTimeInterface) {
            return (int)round($time->format('U.u') * 1000000, 0);
        }

        if (is_int($time)) {
            return $time;
        }

        if (is_float($time)) {
            return (int)round($time * 1000000, 0);
        }

        throw new \InvalidArgumentException(sprintf(
            'Time should be one of the types int|float|DateTime|null, got %s.',
            gettype($time)
        ));
    }