Returns the time in milliseconds passed from the beginning of execution
to the time the event was constructed.

@deprecated This method has been replaced by getRelativeTime which
does not perform unneccesary multiplication and formatting.

@return integer
502490
public function getTime() {
		$eventTime = $this->getTimeStamp();
		$eventStartTime = LoggingEvent::getStartTime();
		return number_format(($eventTime - $eventStartTime) * 1000, 0, '', '');
	}
375274
public static function getMicroTime()
    {
        $returnValue = (float) 0.0;

        
        
        list($ms, $s) = explode(" ", microtime());
        $returnValue = $s+$ms;
        
        

        return (float) $returnValue;
    }
714742
public function getDuration()
    {
        $start = $this->getStarted();

        if (empty($start)) {
            return 0;
        }

        $end = $this->getFinished();

        if (empty($end)) {
            $end = new \DateTime();
        }

        return $end->getTimestamp() - $start->getTimestamp();
    }
865292
public function getTime()
    {
        $time = new \DateTime($this->data['transaction_date'], new \DateTimeZone('EST'));
        $time->setTimezone(new \DateTimeZone('UTC'));

        return $time->format('c');
    }
1013512
public function getTime()
    {
        $time = 0;
        foreach ($this->data['queries'] as $query) {
            if (array_key_exists('took', $query['response'])) {
                $time += $query['response']['took'];
            }
        }

        return $time;
    }
1034009
public function timeStart()
    {
        $now = explode(" ", microtime());
        $this->startTime = $now[1] + $now[0];

        return $this->startTime;
    }
1313078
public function getDOSTimestamp()
    {
        $time = getdate($this->getTimestamp());

        if ($time['year'] < 1980) {
            $time['year']    = 1980;
            $time['mon']     = 1;
            $time['mday']    = 1;
            $time['hours']   = 0;
            $time['minutes'] = 0;
            $time['seconds'] = 0;
        }

        return (($time['year'] - 1980) << 25)
               | ($time['mon'] << 21)
               | ($time['mday'] << 16)
               | ($time['hours'] << 11)
               | ($time['minutes'] << 5)
               | ($time['seconds'] >> 1);
    }
871339
public function GetMicrotime () {
		if ($this->microtime === NULL) $this->microtime = $this->globalServer['REQUEST_TIME_FLOAT'];
		return $this->microtime;
	}
545391
public function getTimeStamp()
    {
        if (!isset($this->timestamp)) {
            $this->handler->populateTimestamp($this);
        }
        return $this->timestamp;
    }
746560
public function getDateTime() {
    $result = new \DateTime();
    $result->setTimestamp((double) $this->pb->getTime() / 1e6);
    return $result;
  }
1307907
public function getFinishTime() {
        if (!isset($this->finishTime)) {
            try {
                $this->finishTime = (string)$this->getData(OntologyDeliveryExecution::PROPERTY_TIME_END);
            } catch (common_exception_NotFound $missingException) {
                $this->finishTime = null;
            }
        }
        return $this->finishTime;
    }
582738
public function getTotalTime()
    {
        if (null === $this->totalTime) {
            $this->totalTime = 0;
            foreach ($this->data['actions'] as $action) {
                if (isset($action['time'])) {
                    $this->totalTime += $action['time'];
                }
            }
            foreach ($this->data['applicableCheckers'] as $applicableChecker) {
                if (isset($applicableChecker['time'])) {
                    $this->totalTime += $applicableChecker['time'];
                }
            }
        }

        return $this->totalTime;
    }
187700
public function getTotalSeconds()
	{
		// Use the days value if it is available otherwise the months value will be used which gives
		// nonsense results when the duration has been created from a day interval because the
		// DateInterval assumes 30 days to every month!
		// BMS 2018-03-20 Changed to look at the 'daysOnly' property and use the 'd' value if it is.
		//				  On this date the parent::getTotalSeconds() function returns a value that is out by an hour
		//				  when returning the interval of this expression:
		//				  (xs:dateTime("1999-10-23T09:08:07Z") - xs:dateTime("1998-09-09T04:03:02Z"))
		//				  which appears in test 'op-subtract-dateTimes-yielding-DTD-19' in 'dateTimesSubtract.xml'
		//				  This interval is 408 days 22 hours 58 minutes and 59 seconds

		if ( ! $this->Value->days && ( $this->Value->y || $this->Value->m ) ) return parent::getTotalSeconds();
		// if ( ! $this->Value->days && ! $this->Value->daysOnly ) return parent::getTotalSeconds();

		$seconds = new DecimalValue( ( $this->Value->days ? $this->Value->days : $this->Value->d ) * 86400 + $this->Value->h * 3600 + $this->Value->i * 60 + $this->Value->s );
		$seconds = $seconds->Add( "0.{$this->Value->microseconds}" );
		if ( $this->Value->invert )
		{
			$seconds = $seconds->Mul( -1 );
		}

		return $seconds;
	}
449343
public function currentUtcDatetime()
    {
        if ($this->timeFormat === static::$timeFormatDatetime) {
            return gmdate('Y-m-d H:i:s');
        }
        if ($this->timeFormat === static::$timeFormatTimestamp) {
            return time();
        }
        return null;
    }
451672
public static function getMicrotime()
    {
        list($usec, $sec) = explode(' ', microtime());
        return ((float)$usec + (float)$sec);
    }
683501
public function getTimerTime()
    {
        if ($this->fltTimeStart == -1) {
            return $this->fltTime;
        }
        return $this->fltTime + microtime(true) - $this->fltTimeStart;
    }
165928
public function totalMicroseconds() : int
    {
        if (null === $this->totalMicroseconds) {
            $reference = DateTime::now();
            $end       = $reference->add($this);

            $this->totalMicroseconds = $end->timestampWithMicrosecond() - $reference->timestampWithMicrosecond();
        }

        return $this->totalMicroseconds;
    }