Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
wait in C
#11
I found out how to make it now Big Grin
take a look at this code (witch someone posted at an other forum(can´t remember the name :oops: ))
Code:
take a look at
#include <stdio.h>
#include <time.h>

int main(void)
{
  time_t tim = time(NULL);
  int ch;
  
  puts ("Press Enter to increment the time, q to quit");
  do
  {
    printf("Virtual time now: %s", ctime(&tim));
    tim += 1;
  } while ((ch = getchar()) != EOF && ch != 'q');
  
  return 0;
}
and you can also take a look at http://www.rt.com/man/strftime.3.html

if you woundered Smile[/code]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)