Tolerance\Tracer\Clock\Clock::microseconds PHP Method

microseconds() public method

Returns the current time in micro-seconds.
public microseconds ( ) : integer
return integer
    public function microseconds();

Usage Example

Ejemplo n.º 1
0
 /**
  * @param RequestInterface $originalRequest
  * @param ResponseInterface|null $response
  *
  * @return Span
  */
 public function fromIncomingResponse(RequestInterface $originalRequest, ResponseInterface $response = null)
 {
     $span = $originalRequest->getHeader('X-B3-SpanId');
     $trace = $originalRequest->getHeader('X-B3-TraceId');
     if (empty($span) || empty($trace)) {
         throw new \InvalidArgumentException('Unable to find the original request properties');
     }
     return new Span(Identifier::fromString($span), $this->getName($originalRequest), Identifier::fromString($trace), [new Annotation(Annotation::CLIENT_RECEIVE, $this->clock->microseconds(), $this->endpointResolver->resolve())], [new BinaryAnnotation('http.status', $response !== null ? $response->getStatusCode() : 0, BinaryAnnotation::TYPE_INTEGER_16)]);
 }
All Usage Examples Of Tolerance\Tracer\Clock\Clock::microseconds