The best way to see if a script will work or not is to test it.

Depending on how accurately you want/need the time checked, your code could be off by about 1 second.
The code I provided could be off by about 0.5 seconds.
Altering my code to include the 0m switch would make it accurate to about 0.5 milliseconds.