A method comprising: adjusting a count of a counter of a first device, in response to a clock signal from a first clock, wherein the first clock is separate from and has a finer time resolution than a radio clock used by radio link-layers and protocols to communicate data packets; generating, at the first device, a first plurality of counts, each of the first plurality of counts indicative of a transmit time of a corresponding ranging packet; generating, at the first device, a second plurality of counts, each of the second plurality of counts indicative of a receive time of a corresponding response packet from a second device, wherein the corresponding response packet includes a data payload indicating a processing time equal to a difference between a receive time of a previous ranging packet at the second device and a transmit time of a previous response packet at the second device, wherein generating the first and second plurality of counts comprises generating each of the first and second plurality of counts by triggering the counter in response to control signaling from a radio of the first device; in response to a number of sets of ranging packet counts and receive packet counts indicative of transmit times and receive times exceeding a threshold, generating a plurality of timestamps based on the first plurality of counts and the second plurality of counts; generating a plurality of time-of-flight values based on the plurality of timestamps and the data payloads indicating the processing times; generating an effective time-of-flight value based on a combination of the plurality of the time-of-flight values; and identifying a distance between the first device and the second device based on the effective time-of-flight value, wherein the method further comprises keeping a count of rollovers at the counter and employing the count of rollovers to generate the plurality of timestamps based on the first plurality of counts and the second plurality of counts. adjusting a count of a counter of a first device, in response to a clock signal from a first clock, wherein the first clock is separate from and has a finer time resolution than a radio clock used by radio link-layers and protocols to communicate data packets; generating, at the first device, a first plurality of counts, each of the first plurality of counts indicative of a transmit time of a corresponding ranging packet; generating, at the first device, a second plurality of counts, each of the second plurality of counts indicative of a receive time of a corresponding response packet from a second device, wherein the corresponding response packet includes a data payload indicating a processing time equal to a difference between a receive time of a previous ranging packet at the second device and a transmit time of a previous response packet at the second device, wherein generating the first and second plurality of counts comprises generating each of the first and second plurality of counts by triggering the counter in response to control signaling from a radio of the first device; in response to a number of sets of ranging packet counts and receive packet counts indicative of transmit times and receive times exceeding a threshold, generating a plurality of timestamps based on the first plurality of counts and the second plurality of counts; generating a plurality of time-of-flight values based on the plurality of timestamps and the data payloads indicating the processing times; generating an effective time-of-flight value based on a combination of the plurality of the time-of-flight values; and identifying a distance between the first device and the second device based on the effective time-of-flight value, wherein the method further comprises keeping a count of rollovers at the counter and employing the count of rollovers to generate the plurality of timestamps based on the first plurality of counts and the second plurality of counts.