Last active
March 4, 2018 14:49
-
-
Save AungWinnHtut/c5f2bb0c001c84046b1d8738219a3af3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//These functios will help you when you need old delay() and clrscr() functions from Turbo C | |
//Anyone can use this code freely | |
//The original coder of delay function is https://stackoverflow.com/users/5148111/rizwan-raza | |
//I found at https://stackoverflow.com/questions/27447195/how-to-use-delay-function-in-c-using-codeblocks-13-12mingw | |
//Modified and matained by Green Hackers | |
//We will add more code here | |
#include<process.h> | |
#include<time.h> | |
void delay(unsigned int miliS) | |
{ | |
clock_t targetTime = miliS + clock(); | |
while (targetTime > clock()); | |
} | |
void clrscr() | |
{ | |
system("cls"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment