Re: [PATCH] selftests: intel_pstate: ftime() is deprecated

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

 



On Tue, 2020-10-27 at 14:08 -0600, Shuah Khan wrote:
> 
> > @@ -73,8 +80,8 @@ int main(int argc, char **argv) {
> >   	aperf = new_aperf-old_aperf;
> >   	mperf = new_mperf-old_mperf;
> >   
> > -	start = before.time*1000 + before.millitm;
> > -	finish = after.time*1000 + after.millitm;
> > +	start = before.tv_sec*1000 + before.tv_nsec/1000000L;
> > +	finish = after.tv_sec*1000 + after.tv_nsec/1000000L;
> 
> Why not use timespec dNSEC_PER_MSEC define from  include/vdso/time64.h?

Hi,

If the define was available in the UAPI headers, then certainly would make
sense to use it. But I would not mess with the kernel internal headers here.

-Tommi





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux