There is no specific law for the provision of a P60. However, according to regulation 36 of the Income Tax (Pay As You Earn) Regulations 2003, if an employee ceases employment, their employer must provide them with a P45 "on the day on which employment ceases or, if that is not practicable, without unreasonable delay".
What is reasonable would depend on the circumstances but it likely that HMRC would generally consider it unreasonable if the P45 was not completed and sent out immediately after tax and any other deductions are calculated (usually once the final pay run for the employee has been completed).
If an employer does not issue a P45 as required, HMRC can be informed and they will make attempt to get the P45 from them. If they fail to co-operate with HMRC they can potentially be fined.
In the meantime the employee can use their payslips as evidence of tax deducted or earnings over a period and should get further guidance from HMRC in terms of what they can do if the P45 is not supplied at all.
I trust this has answered your query. Please take a second to leave a positive rating by selecting 3, 4 or 5 stars above - this is an important part of our process and recognises the time I have spent assisting you. If you still need me to clarify anything else, please reply on here and I will assist as best as I can. Thank you