Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

C++ timing question

Status
Not open for further replies.

gcaudill

Electrical
Jan 20, 2003
180
I am using Borland C++ v.4.51. I want to execute something every 0.10 sec. How can I use the "data_time.ti_hund" command to do this. Does this command count in 0.010 (0-99 to the machine) second intervals?

I have tried:

hund_time = data_time.ti_hund;
if (hund_time==1)
hund_count=hund_count+1;
if (hund_count==10)
execute something;
if (hund_count>10)
hund_count=0;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor