1.

Solve : Time management?

Answer» <html><body><p>Hi Folks.<br/><br/>I have small timer.<br/>Need to enter a break adherance system.<br/>I can simply count the time I started the program.<br/>While running the file. In between I want to enter something like break.<br/>So, that timer should continue to count. But, Let me also how much minute or hour I been on break. And when I come from break I can continue with normal work.<br/><br/>Here is the code<br/><br/><br/>echo off<br/>set sec=1<br/>set min=0<br/>set hour=0<br/>color 70<br/>:1<br/>title %hour% : %min% : %sec% Vishal timer<br/>set /a sec=%sec%+1<br/>Echo %hour% : %min% : %sec% Vishal timer<br/>ping -n 1 -w 900 1.1.1.1 <br/>cls<br/>if %sec% <a href="https://interviewquestions.tuteehub.com/tag/equ-446399" style="font-weight:bold;" target="_blank" title="Click to know more about EQU">EQU</a> 60 set /a sec=0 &amp; set /a min=%min%+1<br/>if %min% equ 60 set /a min=0 &amp; set /a hour=%hour%+1<br/>goto :1<br/><br/><br/>I want something that can record my break in between of this timer without <a href="https://interviewquestions.tuteehub.com/tag/stopping-774103" style="font-weight:bold;" target="_blank" title="Click to know more about STOPPING">STOPPING</a> the timer in any point.<br/><br/><br/>Thanks and regards<br/>Vishu    open cmd<br/>type Code: <a>[Select]</a>ver and <a href="https://interviewquestions.tuteehub.com/tag/tell-1240910" style="font-weight:bold;" target="_blank" title="Click to know more about TELL">TELL</a> me result<br/>type Code: <a>[Select]</a>echo %time% and tell me resultMicrosoft Windows XP [version 5.1.2600]<br/><br/>1:16:49.27if it doesn't need to run past midnight this works<br/> Code: <a>[Select]</a>echo off<br/>set /a x3=%x%<br/>set /a HH=0<br/>set /a MM=0<br/>set /a SS=0<br/>set /a HM=0<br/>set /a MS=0<br/>set /a HS=0<br/>set /a SA=0<br/>set HH1=%TIME:~0,2%<br/>set MM1=%TIME:~3,2%<br/>set SS1=%TIME:~6,2%<br/>rem time consuming task here<br/>set SS2=%TIME:~6,2%<br/>set HH2=%TIME:~0,2%<br/>set MM2=%TIME:~3,2%<br/>set /a HH=%HH2%-%HH1%<br/>set /a MM=%MM2%-%MM1%<br/>set /a SS=%SS2%-%SS1%<br/>if %HH%==0 goto alt<br/>if %MM%==0 goto alt1<br/>set /a HM=%HH%*60<br/>set /a MS=%MM%*60<br/>set /a HS=%HM%*60<br/>set /a SA=%HS%+%MS%+%SS%<br/>echo it took %SA% seconds<br/>goto C<br/><br/>:alt<br/>if %MM%==0 goto alt1<br/>set /a MS=%MM%*60<br/>set /a SA=%MS%+%SS%<br/>echo it took %SA% seconds<br/>goto C<br/><br/>:alt1<br/>set /a SA=%SS%<br/>echo it took %SA% seconds<br/><br/>:C<br/>pause<br/>exit<br/>don't  add the <br/>set /a x3=%x%<br/>line cut and paste error <a href="https://interviewquestions.tuteehub.com/tag/sorry-648642" style="font-weight:bold;" target="_blank" title="Click to know more about SORRY">SORRY</a>.how about the time sheets? have you used it before..<br/><br/><a href="http://www.labortimetracker.com/"> Staff Time Management </a>  <br/>  <br/><br/>This is out of the figure.<br/>Actually this is not the thing that I was asking.<br/><br/>I want something to check the break time while running the counter.<br/>I want to input a word B that will start to count break.<br/>when I return from break press S and it will save the time spent on break.<br/>Counter still be continued. Will give me total time i logged in. I mean from the time I ran the file. Code: <a>[Select]</a>echo off<br/>:77<br/>choice /c:B /N<br/>set /a HH=0<br/>set /a MM=0<br/>set /a SS=0<br/>set /a HM=0<br/>set /a MS=0<br/>set /a HS=0<br/>set /a SA=0<br/>set HH1=%TIME:~0,2%<br/>set MM1=%TIME:~3,2%<br/>set SS1=%TIME:~6,2%<br/>choice /c:S /N<br/>set SS2=%TIME:~6,2%<br/>set HH2=%TIME:~0,2%<br/>set MM2=%TIME:~3,2%<br/>for /l %%a in (1,1,9) do if %MM2%==0%%a set MM2=%%a<br/>for /l %%a in (1,1,9) do if %HH2%==0%%a set HH2=%%a<br/>for /l %%a in (1,1,9) do if %SS2%==0%%a set SS2=%%a<br/>for /l %%a in (1,1,9) do if %MM1%==0%%a set MM1=%%a<br/>for /l %%a in (1,1,9) do if %HH1%==0%%a set HH1=%%a<br/>for /l %%a in (1,1,9) do if %SS1%==0%%a set SS1=%%a<br/>set /a HH=%HH2%-%HH1%<br/>set /a MM=%MM2%-%MM1%<br/>set /a SS=%SS2%-%SS1%<br/>if %HH%==0 goto alt<br/>if %MM%==0 goto alt1<br/>set /a HM=%HH%*60<br/>set /a MS=%MM%*60<br/>set /a HS=%HM%*60<br/>set /a SA=%HS%+%MS%+%SS%<br/>goto C<br/><br/>:alt<br/>if %MM%==0 goto alt1<br/>set /a MS=%MM%*60<br/>set /a SA=%MS%+%SS%<br/>goto C<br/><br/>:alt1<br/>set /a SA=%SS%<br/>:C<br/>set h=0<br/>set m=0<br/>set s=0<br/>:B<br/>if %sa% lss 360 goto D<br/>set /A h=%h%+1<br/>set /A sa=%sa%-360<br/>goto b<br/>:D<br/>if %sa% lss 60 goto E<br/>set /A m=%m%+1<br/>set /A sa=%sa%-60<br/>goto D<br/>:E<br/>if %sa% lss 1 goto F<br/>set /A s=%s%+1<br/>set /A sa=%sa%-1<br/>goto E<br/>:F<br/>cls<br/>title %H% : %M% : %S%<br/>echo %H% : %M% : %S%<br/>pause &gt; nul<br/>cls<br/>goto 77note needs choice  download in zip<br/><br/>[recovering disk space - old attachment deleted by admin]  <br/><br/>It's not working. Sorry you can check it yourself.is choice in windows\system32 folder</p></body></html>


Discussion

No Comment Found