Get the elapsed time since a given starting point.

@param  int    $start
@return float
320691
protected function getElapsedTime($start)
    {
        if ($this->elapsedTimeMethod === null) {
            $reflection = new ReflectionClass($this->getConnect());
            $this->elapsedTimeMethod = $reflection->getMethod('getElapsedTime');
            $this->elapsedTimeMethod->setAccessible(true);
        }

        return $this->elapsedTimeMethod->invoke($this->getConnect(), $start);
    }
1131976
public function getTime()
    {
        $time = 0;
        foreach ($this->data['queries'] as $query) {
            $time += (float) $query['time'];
        }

        return $time;
    }
804206
public function duration(): ?float
    {
        $endTime = $this->call->endTime();

        if (null === $endTime) {
            return null;
        }

        return $endTime - $this->call->time();
    }
667024
public function startTime()
	{
		$time = microtime();
		$time = explode(' ', $time);
		$time = $time[1] + $time[0];
		$this->startTime = $time;
	}
182228
public static function getDuration($start)
    {
        $time = microtime();
        $time = explode(' ', $time);
        $time = $time[1] + $time[0];
        $finish = $time;
        
        return round(($finish - $start), 4);
    }
1056534
def _elapsed(self):
        
        self.last_time = time.time()
        return self.last_time - self.start
120894
public function getElapsed() : float
    {
        if ($this->startedOn === null) {
            throw new NotStartedException();
        }

        return ($this->stoppedOn === null) ?
            $this->toMicro(microtime(true) - $this->startedOn) :
            $this->getDuration();
    }
352515
public function setStart($start)
    {
        Argument::i()->test(1, 'int');
        
        if ($start < 0) {
            $start = 0;
        }
        
        $this->start = $start;
        
        return $this;
    }
1208299
public static function stop_timer( $start ) {
		$time = microtime();
		$time = explode(' ', $time);
		$time = $time[1] + $time[0];
		$finish = $time;
		$total_time = round(($finish - $start), 4);
		return $total_time.' seconds.';
	}
996125
public static function start_timer() {
		$time = microtime();
		$time = explode(' ', $time);
		$time = $time[1] + $time[0];
		return $time;
	}
737326
def elapsed_time(self) -> float:
        
        current_time = datetime.utcnow()
        start = self.start_time or current_time
        end = self.end_time or current_time
        return (end - start).total_seconds()
270167
public function getElapsedTime(): float
	{
		$last = end($this->laps);

		return ($last->isRunning() ? microtime(true) : $last->getStopTime()) - $this->laps[0]->getStartTime();
	}
86501
public function getDuration($from = Timer::START, $to = Timer::STOP) {
        $from = $this->getCheckpoint($from);
        $to = $this->getCheckpoint($to);

        if ($from === null) {
            return 0;
        }

        if ($to === null) {
            $to = microtime(true);
        }

        return abs($to - $from);
    }
963528
protected function diffTimeInNanoseconds($start, $end): int
    {
        if ($this->platformSupportsNanoseconds()) {
            return $end - $start;
        }

        // Difference is in seconds (with microsecond precision)
        // * 1000 to get to milliseconds
        // * 1000 to get to microseconds
        // * 1000 to get to nanoseconds
        return (int) (($end - $start) * 1000 * 1000 * 1000);
    }
881599
protected function getMinutes($duration)
	{
		if ($duration instanceof DateTime)
		{
			$duration = Carbon::instance($duration);

			return max(0, Carbon::now()->diffInMinutes($duration, false));
		}
		else
		{
			return is_string($duration) ? intval($duration) : $duration;
		}
	}
965467
public function getDuration()
    {
        if (!isset($this->data['events']['__section__'])) {
            return 0;
        }

        $lastEvent = $this->data['events']['__section__'];

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

        return $this->startTime;
    }