bindings: cxx: fix event timestamp calculation for 32bit
authorKent Gibson <warthog618@gmail.com>
Wed, 9 Sep 2020 01:40:03 +0000 (09:40 +0800)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 14 Sep 2020 08:30:10 +0000 (10:30 +0200)
commit2fd82f7048ecd718b157ebc557e2d0424c9da097
tree02887552c9477941da3aeb22fe968377cd0cb380
parentfc61e740fcbe3c6594295766759888c96c45bd29
bindings: cxx: fix event timestamp calculation for 32bit

Use appropriate C++ chrono library functions to convert the event
timestamp from a struct timespec to ::std::chrono::nanoseconds to
ensure correct conversion independent of platform.

Fixes: 8078a4a2ad90 ("bindings: implement C++ bindings")
Reported-by: Florian Evers <florian-evers@gmx.de>
Signed-off-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
bindings/cxx/line.cpp