linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Helmut Grohne <helmut.grohne@intenta.de>
To: <linux-gpio@vger.kernel.org>, Bartosz Golaszewski <bartekgola@gmail.com>
Subject: [libgpiod] cxx bindings: time_point vs duration
Date: Thu, 15 Oct 2020 10:38:06 +0200	[thread overview]
Message-ID: <20201015083805.GA10354@laureti-dev> (raw)

Hi,

I was trying to use the C++ bindings of libgpiod and wondered about
this.

| struct line_event {
| 	...
| 	::std::chrono::nanoseconds timestamp;
| 	...
| };

std::chrono::nanoseconds is a duration, an interval of time. The member
is called timestamp. It is documented as an estimate of the time point
when the event actually happened. It seems to me that conceptually
std::chrono::time_point would have type of choice here. What was the
reason for not using it?

Helmut

             reply	other threads:[~2020-10-15  8:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15  8:38 Helmut Grohne [this message]
2020-10-15  9:26 ` [libgpiod] cxx bindings: time_point vs duration Bartosz Golaszewski
2020-10-15  9:35   ` Helmut Grohne
2020-10-15 10:05     ` Bartosz Golaszewski
2020-10-15 10:57       ` Helmut Grohne
2020-10-15 11:43         ` Bartosz Golaszewski
2020-10-15 12:13           ` Helmut Grohne
2020-10-15 12:16             ` Bartosz Golaszewski
2020-10-21 13:57               ` Jack Winch
2020-10-21 14:35                 ` Jack Winch
2020-10-21 15:14                 ` Bartosz Golaszewski
2020-10-21 15:44                   ` Jack Winch
2020-10-22  6:39                 ` Helmut Grohne
2020-10-22  9:09                   ` Jack Winch
2020-10-22  9:35                     ` Bartosz Golaszewski
2020-10-22  9:47                       ` Jack Winch
2020-10-22 11:55                         ` Bartosz Golaszewski
2020-10-22 12:22                           ` Jack Winch
2020-10-23 16:22                             ` Bartosz Golaszewski

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=20201015083805.GA10354@laureti-dev \
    --to=helmut.grohne@intenta.de \
    --cc=bartekgola@gmail.com \
    --cc=linux-gpio@vger.kernel.org \
    /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 NNTP newsgroup(s).