Source from Tine Ivanič We need loops in batch file to prevent writing long blocks of code and to do repetitive process. There are 2 ways to do looping in Windows Batch. Method 1 Use this method for numeric values FOR /L %%A IN (1,1,200) DO (ECHO %%A) where 1,1,200 means start, increment step and end …
Tag Archives: Programming
How to prepare for Embedded C interview
I have compiled some of the common interview questions that you may encounter if you are applying for embedded software position. Hope it benefits you. Image by Ilya Pavlor at Unsplash What is the difference between hard real-time and soft real-time OS? A Hard real-time system strictly adheres to the deadline associated with the task. If …
How calculate time difference in Windows Batch?
Source from Sonja Langford A small piece of code to determine time difference. Could be useful and integrated to your batch file. @echo off rem Get start time:for /F “tokens=1-4 delims=:.,” %%a in (“%time%”) do (set /A “start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100”) rem Any process here…TIMEOUT /T 60TIMEOUT /T 1 rem Get end time:for …
Continue reading “How calculate time difference in Windows Batch?”