Correct way for calculating compute units based on users requests

Let’s consider an Auto Scale with 1 vCPU and 1 GB RAM (20 compute units/sec)

The docs say it rounds to 100 miliseconds. So a request that takes 400 miliseconds, for example, would spend 8 compute units?

Yes, IIRC that is correct. But do note that requests might take longer, e.g. network speed, etc.