callTiming() function

Splits a call's round trip from the request a client sent and the response it was answered with.

Signature:

export declare function callTiming(request: Partial<IMQRPCRequest> | undefined, response: Partial<IMQRPCResponse> | undefined, answeredAt?: number): IMQCallTiming | null;

Parameters

Parameter

Type

Description

request

Partial<IMQRPCRequest> | undefined

the request as the client sent it, carrying sentAt

response

Partial<IMQRPCResponse> | undefined

the response as it arrived, carrying timing

answeredAt

number

(Optional) when the answer arrived, by the caller's clock

Returns:

IMQCallTiming | null

the split, or null where either side did not record its half

Remarks

Each figure is a difference of two readings of one clock — total the caller's, handled and waited the service's — so clocks that disagree between hosts move no figure. transit is what is left, and is where a busy caller, a busy broker and the size of a message show.

Call it from an afterCall hook, which runs as the answer arrives.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.