How to know when serial has finished sending

I am using the HW UART, which is called Serial1.

Using flush and then waiting 1ms is fine.