//************************************** // Name: Simple Digital Clock // Description:It is a super demonstration of a small digital clock which supports display to micro-seconds. It continuously changes hours:minutes:seconds.microseconds. This is my first code so I want you to encourage me and rate me! I don't expect any prises but want encouragement which I deserve for my thoughts! // By: Adil Memon // // // Inputs:None // // Returns:None // //Assumes:None // //Side Effects:None //This code is copyrighted and has limited warranties. //Please see http://www.Planet-Source-Code.com/xq/ASP/txtCodeId.6980/lngWId.3/qx/vb/scripts/ShowCode.htm //for details. //************************************** /* Fully commented If you need to contact me: Name: Adil Email: adilmemon@excite.com */ /* Your rating encourages me, if you don't rate. No more code for you, kiddies */ /* Includes the function gettime(); to collect the current time */ #include /* Contains the function clrscr(); #include /* Starts the main Function */ void main() /* Starts the code */ { /* Builds an structure 't' for time */ struct time t; /* Clears the screen */ clrscr(); /* The line name is given for continual updating of time, and the gettime(); command retrieves the current time */ loop: gettime(&t); // Improves visibility by giving a Yellow Colour textcolor(14); /* This is the print command for the time, using the structure 't' */ cprintf("\rThe current time is:%2d:%02d:%02d.%02d", t.ti_hour, t.ti_min,t.ti_sec,t.ti_hund); /* Continues the loop, directing the programme to the gettime(); command */ goto loop; } /* Code Terminator */