How can I express 10 milliseconds using timeval?
This is what I have so far:
struct timeval now;
now.tv_usec =10000;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A
struct timevalrepresents a time as a number of seconds (tv_sec) plus a number of microseconds (tv_usec) between 0 and 999,999. Thus, to represent 10 milliseconds, you would use 10,000 microseconds, as you suggested: