($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz at gmail.com>
To: ell at lists.01.org
Subject: Re: [PATCH] dhcp,dhcp6,icmp6,time: Convert timestamps to CLOCK_BOOTTIME
Date: Wed, 18 May 2022 09:22:12 -0500	[thread overview]
Message-ID: <199d1841-ae36-3c42-02ac-825f8a98a3a8@gmail.com> (raw)
In-Reply-To: CAOq732KHoZrEbf47m8NSa8suJ-EVV5yFAWWE8f22DFkVyTV-Qw@mail.gmail.com

[-- Attachment #1: Type: text/plain, Size: 876 bytes --]

Hi Andrew,

>> By the way, given that you're using struct timespec below, do you want to use
>> SO_TIMESTAMPNS?
> 
> It doesn't seem that this would simplify the arithmetics in this case.
> I wonder if we should bother to use the _NEW variant, which makes sure
> the timestamp is year 2038-proof on 32-bit systems.
> 

Probably might as well.

<snip>

>>> +     return ((int64_t) realtime.tv_sec - boottime.tv_sec) * 1000000 +
>>> +             ((int64_t) realtime.tv_nsec - boottime.tv_nsec) / 1000;
>>
>> Lets use the L_USEC_* defines when possible.
> 
> Ok.  (IIRC this was done for consistency with l_time_now)
> 

Ah, I need to fix that.  The problem is that this function was added before the 
#defines existed.

I have now added commit:
bd5a2dc26441 ("time: Add converters from struct {timespec|timeval}")

Please review.

Regards,
-Denis

             reply	other threads:[~2022-05-18 14:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18 14:22 Denis Kenzior [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-05-18 14:19 [PATCH] dhcp,dhcp6,icmp6,time: Convert timestamps to CLOCK_BOOTTIME Denis Kenzior
2022-05-18  0:35 Andrew Zaborowski
2022-05-18  0:22 [PATCH] dhcp, dhcp6, icmp6, time: " Andrew Zaborowski
2022-05-17 23:29 Andrew Zaborowski
2022-05-17 14:37 [PATCH] dhcp,dhcp6,icmp6,time: " Denis Kenzior
2022-05-16 21:31 Andrew Zaborowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199d1841-ae36-3c42-02ac-825f8a98a3a8@gmail.com \
    --to=ell@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).