:BatchDelay
Set /a delayLen=%1 %% 60
Set nowtime=%TIME:~6,-3%
Set /a delayEnd=%nowtime%+%delayLen%
Set /a delayEnd=%delayEnd% %% 60
:BatchDelay2
Echo %delayEnd% %TIME:~6,-3%
Set nowtime=%TIME:~6,-3%
If %delayEnd% NEQ %nowtime% Goto :BatchDelay2
Goto Eof
:BatchDelay
Set /a delayLen=%1 %% 60
Set nowtime=%TIME:~6,-3%
If %nowtime:~0,1% EQU 0 Set nowtime=%nowtime:~-1%
Set /a delayEnd=%nowtime%+%delayLen%
Set /a delayEnd=%delayEnd% %% 60
:BatchDelay2
Set nowtime=%TIME:~6,-3%
If %nowtime:~0,1% EQU 0 Set nowtime=%nowtime:~-1%
Echo %delayEnd% %nowtime%
If %delayEnd% NEQ %nowtime% Goto :BatchDelay2
Goto Eof