Re: [PATCH 1/3]: Inline for time delta

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

 



On 6/16/07, Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxxxxxxx> wrote:
On 6/16/07, Gerrit Renker <gerrit@xxxxxxxxxxxxxx> wrote:
> Quoting Arnaldo Carvalho de Melo:
> |  > The name was chosen for consistency with timeval_delta(), which is the current
> |  > function for microsecond time differences in net/dccp/dccp.h.
> |
> |  I'm going to rename ktime_delta() to ktime_us_delta(), as it receives
> |  two ktime_t values, but returns a delta in microseconds, not in
> |  ktime_t.
> I am going to change that in my tree as well, since I am busy updating with regard
> to most recent changes anyway.

I just checked with Thomas Gleixner, the ktime_t guy and he is ok with
adding ktime_us_delta() to ktime.h, which I have in my tree already.

I'm now staring at this:
   /* set the nominal send time for the next following packet */
-        timeval_add_usecs(&hctx->ccid3hctx_t_nom, hctx->ccid3hctx_t_ipi);
+       hctx->ccid3hctx_t_nom = ktime_add_ns(hctx->ccid3hctx_t_nom,
+                                            hctx->ccid3hctx_t_ipi * 1000);

I'm thinking about just keeping t_ipi in nanoseconds to avoid doing
the multiplies back and forth, but haven't fully looked at the other
t_ipi uses, quick thoughts? Stupid idea?

Nah, will just add ktime_add_us to the ktime infrastructure (also
ACKed by Thomas).

- Arnaldo
-
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [IETF DCCP]     [Linux Networking]     [Git]     [Security]     [Linux Assembly]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux