Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Timer in C: clock() function

Status
Not open for further replies.

hexacell

Programmer
Mar 1, 2002
1
BE
Using clock() function has at least one significant disadvantage - it cannot count more than some certain amount of ticks, and, therefore, long enough periods are indicated as negative. For some common UNIX systems, ithe limit is around 36 min.

Any known workaround ?

P.S. I checked FAQs and Search but didn't found anything...
 
If the possibility of a timer 'wrap-around' exists in your application, you will have to set up an outer loop that counts the wrap-arounds. Check your man page. I have a SCO OSR5.06 box and it has a good suggestion in the man.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top