Re: v4l2 api

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 10 Oct 02 at 10:30, Gerd Knorr wrote:
> > >  * replace stamp_t with struct timeval, drop all time functions.
> > >    We'll simply use gettimeofday like everybody else.
> > 
> > What about 'struct timespec' used by nanosleep? It has nanosecond
> > resolution, so you can timestamp outgoing pixels, if you have such need...
> 
> Is there some equivalent to gettimeofday(2) which returns a struct
> timespec?

No, but if you'll look at arch/i386/kernel/do_gettimeofday, you'll
find that it actualy converts time from nsecs to usecs, as global
xtime variable is timespec, not timeval...

>From userspace timespec is passed to futex(), nanosleep() and 
sched_rr_get_interval(). I do not see gettimespec() in the kernel ABI,
but you can always multiply usecs in gettimeofday by 1000.
                                                    Petr Vandrovec
                                                    vandrove@xxxxxxxxxx
                                                    





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux