Timer

Published

Introduction: Timer

About: I love to tinker with electronics. i have been able to replicate some of Tesla's projects. right now I am in the process of trying to figure out the technicalities of my latest design of an electromagnetical...

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!!!

Share

    Recommendations

    • Clocks Contest

      Clocks Contest
    • Planter Challenge

      Planter Challenge
    • Woodworking Contest

      Woodworking Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    3 Comments

    I agree. But do you mean, "Batch"? You said, "bash".

    Yeah, lol :) Bash Script is Mac. I meant batch :P