Hi Zwift,
During races time gaps are shown between (groups of) riders. However, the times shown fluctuate quite a lot for instance if one group starts going up instead of riding flat.
The correct way to calculate the time gap is to time all the riders along the route, say every 200 m, and from that calculate the gap. This way of doing it will correctly include the changes in velocity that come from changes in terrain, etc.
Cheers,