diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-04-26 16:00:03 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-04-27 08:50:01 +0000 |
commit | 3460ad7f31fb1daa529662a1b2ac4d4b0f5e9a7e (patch) | |
tree | ec5490773e0b440c5e93b390a90c3f9754e76809 /src | |
parent | e98afe5808176efb60298a2f764e8e11efaf580b (diff) |
osmux: Use osmo_gettimeofday for testing puroposes
This way we can use fake time and osmux_test take 700ms instead of
>2sec to run.
Change-Id: Ic39cab74400aca8262a00c0d06884230b1a15ca3
Diffstat (limited to 'src')
-rw-r--r-- | src/osmux.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osmux.c b/src/osmux.c index 4d12427..d12a39a 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -777,7 +777,7 @@ static void osmux_tx_cb(void *data) #ifdef DEBUG_TIMING struct timeval now, diff; - gettimeofday(&now, NULL); + osmo_gettimeofday(&now, NULL); timersub(&now, &h->start, &diff); timersub(&diff,&h->when, &diff); LOGP(DLMIB, LOGL_DEBUG, "we are lagging %lu.%.6lu in scheduled " @@ -806,7 +806,7 @@ osmux_tx(struct msgb *msg, struct timeval *when, h->timer.data = h; #ifdef DEBUG_TIMING - gettimeofday(&h->start, NULL); + osmo_gettimeofday(&h->start, NULL); h->when.tv_sec = when->tv_sec; h->when.tv_usec = when->tv_usec; #endif |