Alex Rivera | Logout

How to get the current time in milliseconds from C in Linux?

Asked 2010-09-20T23:43:46.003
119

How do I get the current time on Linux in milliseconds?

Edit
Report

1 Answer

12

Use gettimeofday() to get the time in seconds and microseconds. Combining and rounding to milliseconds is left as an exercise.

answered 2010-09-20T23:46:24.447

Your Answer