Re: boot time, process start time, and NOW time

From: James Courtier-Dutton
Date: Mon Aug 16 2004 - 20:57:21 EST


Albert Cahalan wrote:


That's userspace, which works fine on a 2.4.xx kernel.
If userspace were to change, it wouldn't work OK for
a 2.4.xx kernel anymore. So consider that cast in stone.

"now" is the time() function. Using gettimeofday()
would only make sense if I decided to pay the cost
of asking for the time every time I look at a task.


While on the subject of time, is it possible to get a monotonic timer with 1ms or better resolution?
We need this for linux multimedia applications, and it is used to sync audio and video. Currently we use gettimeofday(). If a movie is playing, and the user goes and changes the time, or changes the timezone, we do not want that to effect the movie playing. I have not been able to find a monotonic 1ms accurate timer in the linux kernel, that is available to applications, and has little overhead. Some efficient ioctl or function call for uptime to 1ms accuracy would do perfectly.

James
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/