Re: Linking error

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

 



>>> [...]
>>> 	delta_us = timespec_to_ns(&tv_delta) / 1000;
>>> [...]
>> Sorry. do_div() required.
> 
> No, the best solution seems to be to add a timespec_to_us() to
> include/linux/time.h, something like (untested):
> 
> static inline s64 timespec_to_us(const struct timespec *ts)
> {
>         return ((s64) ts->tv_sec * USEC_PER_SEC) + ts->tv_nsec / 1000;
> }
> 
> cu
> Adrian
Thanks, but I give up on getnstimeofday. Aparently I was trying to use it 
for something that it isn't designed for. In any way I had delta from 
61us to 900us, but in fact it is >8ms. I'm using ACPI PM timer now 
(direcly by inl()). It seems to be more reliable and it is only 32bit 
wide.

Regards
Rafał


----------------------------------------------------------------------
Oficjalne konto pocztowe europejskich internautow! 
>>> http://link.interia.pl/f19e8


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux