Introduction: Timer
In this instructable I will show you how to make an endless timer. I came up with this idea while coming home from vacation and now I am sharing it to all of you on instructables. This program is a simple idea but the coding for it took a lot of trial and error. Hope yall enjoy this little program, and I don't have to put up any warnings for this program :)!!!
Step 1: Coding the Program
@echo off
color 0c
setlocal delayexpansion
cls
@mode con cols=20 lines=2
title.
goto time3
set tim=0
set tim1=0
set tim2=0
set tim3=0
:time
set /a tim=%tim%+1
set tim1=0
set tim2=0
set tim3=0
goto time3
:time1
set /a tim1=%tim1%+1
If %tim1%==60 goto time
set tim2=0
set tim3=0 goto time3
:time2
set /a tim2=%tim2%+1
if %tim2%==60 goto time1
set tim3=0 goto time3
:time3
cls
set /a tim3=%tim3%+1
if %tim3%==60 goto time2
echo %tim% : %tim1% : %tim2% : %tim3%
ping localhost -n 1 >nul
goto time3
Step 2: Finished Product
!!!HAVE FUN WITH IT!!!

Participated in the
Coded Creations
3 Comments
8 years ago on Introduction
Cool, some good use of bash to achieve something.
Reply 8 years ago on Introduction
I agree. But do you mean, "Batch"? You said, "bash".
Reply 8 years ago on Introduction
Yeah, lol :) Bash Script is Mac. I meant batch :P