Hey qian - a 20 ms delta between the frame timestamp and host receive time can be normal. It is not only “USB transmission time”; it can include sensor readout, ISP/image processing, XLink transfer, host queueing, and any pipeline nodes between the camera and host.
In DepthAI, getTimestamp() is synchronized to the host steady clock, while getTimestampDevice() is the device monotonic clock. For host latency, compare dai.Clock.now() at receive time with imgFrame.getTimestamp(). Also make sure the host queue is not accumulating frames; use a small queue, e.g. maxSize=1, blocking=False, when measuring low latency.
Best,
Oskar