From: Bartosz Golaszewski Date: Thu, 15 Oct 2020 08:45:27 +0000 (+0200) Subject: TODO: add a task for replacing chrono::duration with chrono::time_point X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a3aceace1b75f8eea30bd31ad3efcc4ed417d731;p=qemu-gpiodev%2Flibgpiod.git TODO: add a task for replacing chrono::duration with chrono::time_point We should store event timestamps in C++ bindings in ::std::chrono::time_point objects rather than in ::std::chrono::duration. Add a task for that to TODO. Suggested-by: Helmut Grohne Signed-off-by: Bartosz Golaszewski --- diff --git a/TODO b/TODO index 320c470..c7cae8e 100644 --- a/TODO +++ b/TODO @@ -101,3 +101,9 @@ of methods, properties should be used wherever possible (chip's name and label, line's direction, active-state etc.), we should probably store the line objects within the chip instead of creating them everytime get_line() is called and several more. + +* use ::std::chrono::time_point instead of ::std::chrono:duration in C++ + bindings + +Duration is a time interval so it's not the best candidate for storing +timestamps. Switch to using time_point where applicable.