Skip to content

Instantly share code, notes, and snippets.

@Codeplaza
Created November 5, 2013 10:38
Show Gist options
  • Select an option

  • Save Codeplaza/7317101 to your computer and use it in GitHub Desktop.

Select an option

Save Codeplaza/7317101 to your computer and use it in GitHub Desktop.
#include<stdio.h>
#include<time.h>
void delay(unsigned int mseconds)
{
clock_t goal = mseconds + clock();
while (goal > clock());
}
int main()
{
int i;
for(i=0;i<10;i++)
{
delay(1000);
printf("This is delay function\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment