Don't bother,
Use a M04 P 2.0 command in your speed change code inside Mach after the M05 or M01 commands.
this will stop the motor, wait two seconds then carry on with the code.

It can be hard coded into the post processor so it's there but out of mind.

Also pays to use the same command after the M03 start up to give the motor chance to spool up before any cutting takes place.