Is there a similar function like GetTickCount() for Linux?
I´ve tried out some other sutff, but they didn´t work at all.
So it should return the exact time in milliseconds since startup.
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.
clock_gettime with CLOCK_MONOTONIC is the magic incantation you seem to be looking for. Sample code, untested:
Let me know how you get on. I’m not on Linux at the moment, hence this is just conjecture from the man page I pointed to.