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: Code-Review-1

(2 comments)

https://gerrit.osmocom.org/#/c/5103/6/src/timer.c
File src/timer.c:

https://gerrit.osmocom.org/#/c/5103/6/src/timer.c@207
PS6, Line 207:  ns = t_diff_nsec(&t_now, from);
these functions are really not needed. Drop them and instead include 
<osmocom/core/timer_compat.h> and use timersub().


https://gerrit.osmocom.org/#/c/5103/6/tests/timer/timer_test.c
File tests/timer/timer_test.c:

https://gerrit.osmocom.org/#/c/5103/6/tests/timer/timer_test.c@198
PS6, Line 198:  if (osmo_clock_gettime(CLOCK_MONOTONIC, &t_start) != 0)
that's a bit weird. Getting a time after enabling override but not setting an 
initial time before? Same later, you are adding time without setting it before 
in here.

Probably override time is 0,0 by default due to being static memory? Still it's 
clearer if you set it to 0,0 explicitly.



--
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:37:37 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes

Reply via email to