Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sleep Function Error In C

Tags:

c++

c

windows

I have a file of data Dump, in with different timestamped data available, I get the time from timestamp and sleep my c thread for that time. But the problem is that The actual time difference is 10 second and the data which I receive at the receiving end is almost 14, 15 second delay. I am using window OS. Kindly guide me.

Sorry for my week English.

like image 566
Siddiqui Avatar asked Aug 23 '26 14:08

Siddiqui


1 Answers

The sleep function will sleep for at least as long as the time you specify, but there is no guarantee that it won't sleep for longer.If you need an accurate interval, you will need to use some other mechanism.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!