Code:
#include <stdio.h>
#include <time.h>
int main(int argc, char **argv)
{
clock_t startTime=0;
while(1)
{
startTime=clock();
while((clock()-startTime)/CLOCKS_PER_SEC<1000); //Sleep one second
printf("One second elapsed!");
}
}
Now I don't know if thats perfect, because its off the top of my head. But I do know you need to look into clock() from time.h
Enjoy!