But this depends on too many factors:
- Network latency between Edge and Cloud ( which if it's public internet, can be totally random )
- Network latency between Cloud and Browser PC ( which for sure it's public internet, will be totally random )
- TW Cloud Instance load ( depending on the load you can get different throughput )
- Browser PC Performance ( on rendering the mashup )
- Perfect Time Sync between Edge and Browser PC, otherwise you won't be able to calculate exactly the latency
Anyway, if you want to have an aproximate, just send from Edge the exact time, and when you receive the data ( Push Mashup ) on the mashup with an expression widget just substract the received data from new Date().getTime().
I agree that time-sync will be quite challenging because otherwise, you have no clear reference. Anyhow, if you just need to measure the difference between different security settings this could work also with some milli seconds difference between server and edge.
I would generate a timestamp on the edge and transfer this to the server. On the server site, you can create a service (data change) using a specific user credential to read the value and calculate the difference between now() and the time in the timestamp. The difference you add continuously into an info table.
In this scenario, you missed the rendering of the browser and the transfer back to e.g. chrome. But you make things much easier and able to automate. I assume that credential and security impact (if noticeable) can be evaluated with this method, too.