Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/5103 )
Change subject: Add function to estimate elapsed time ...................................................................... Patch Set 6: (1 comment) https://gerrit.osmocom.org/#/c/5103/6/src/timer.c File src/timer.c: https://gerrit.osmocom.org/#/c/5103/6/src/timer.c@196 PS6, Line 196: time_t osmo_time_elapsed(const struct timespec *from, enum osmo_elapsed kind) You are not specifying here it must be used with a monotonic clock. TBH, I like this API as a timespec to different time magnitude conversions,but I'd drop the osmo_clock_gettime(now) from here. Let user manage the time sources himself through osmo_clock_gettime and timersub and in this API simply do the conversion of this timespec. -- To view, visit https://gerrit.osmocom.org/5103 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I83d865ff633a7ebda2c943477205fd31aceda277 Gerrit-Change-Number: 5103 Gerrit-PatchSet: 6 Gerrit-Owner: Max <[email protected]> Gerrit-Reviewer: Harald Welte <[email protected]> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max <[email protected]> Gerrit-Reviewer: Neels Hofmeyr <[email protected]> Gerrit-Reviewer: Pau Espin Pedrol <[email protected]> Gerrit-Reviewer: Vadim Yanitskiy <[email protected]> Gerrit-Comment-Date: Sun, 30 Dec 2018 23:43:47 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No
