Re: [PATCH V6 08/20] rtla: Helper functions for rtla

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

 



On Wed, 27 Oct 2021 22:02:46 +0800
Tao Zhou <tao.zhou@xxxxxxxxx> wrote:

> > +long parse_ns_duration(char *val)
> > +{
> > +	char *end;
> > +	long t;
> > +
> > +	t = strtol(val, &end, 10);
> > +
> > +	if (end) {
> > +		if (!strncmp(end, "ns", 2)) {
> > +			return t;
> > +		} else if (!strncmp(end, "us", 2)) {
> > +			t *= 1000;
> > +			return t;
> > +		} else if (!strncmp(end, "ms", 2)) {
> > +			t *= 1000 * 1000;
> > +			return t;
> > +		} else if (!strncmp(end, "s", 1)) {
> > +			t *= 1000 * 1000 * 100;  
>                                ^^^
> Ah, 1000 not 100. 

Hi Tao,

Please trim your emails and cut the part that is not needed in your reply.

If I scroll down three times and see no text, I likely just delete the
email without reading further. I know others that do the same.

I exempted your email this time.

-- Steve



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux