Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Time function

DanfferDanffer Member Posts: 2

How can I generate a basic timer program on C?
let say, after 100 s, the program will print "asleep"

Thank you

Danffer

Comments

  • AsmGuru62AsmGuru62 Member Posts: 6,519
    :
    : How can I generate a basic timer program on C?
    : let say, after 100 s, the program will print "asleep"
    :
    : Thank you
    :
    : Danffer
    :
    [blue]The timing is connected to the system usually. In DOS you will do it in one way, in Windows - the other way. Linux may have its own way...[/blue]
  • IDKIDK Member Posts: 1,784
    :
    : How can I generate a basic timer program on C?
    : let say, after 100 s, the program will print "asleep"
    :
    : Thank you
    :
    : Danffer
    :
    One way I used a lot in basic, run a simple loop that itarates a million
    times.

    This could result in different time's depending on computer and compiler,
    but it works good.

    [b]Niklas Ulvinge[/b] [white]aka [b]IDK[/b][/white]

Sign In or Register to comment.