Replaces clock_gettime() with ast_tsnow()
clock_gettime() is, unfortunately, not portable. But I did like that over our usual `ts.tv_nsec = tv.tv_usec * 1000` copy/paste code we usually do when we want a timespec and all we have is ast_tvnow(). This patch adds ast_tsnow(), which mimics ast_tvnow(), but returns a timespec. If clock_gettime() is available, it will use that. Otherwise ast_tsnow() falls back to using ast_tvnow(). Change-Id: Ibb1ee67ccf4826b9b76d5a5eb62e90b29b6c456e
Showing
- configure 127 additions, 5 deletionsconfigure
- configure.ac 4 additions, 0 deletionsconfigure.ac
- include/asterisk/autoconfig.h.in 3 additions, 0 deletionsinclude/asterisk/autoconfig.h.in
- include/asterisk/time.h 34 additions, 0 deletionsinclude/asterisk/time.h
- main/Makefile 1 addition, 0 deletionsmain/Makefile
- makeopts.in 2 additions, 0 deletionsmakeopts.in
- tests/test_dns.c 3 additions, 3 deletionstests/test_dns.c
- tests/test_dns_query_set.c 1 addition, 1 deletiontests/test_dns_query_set.c
- tests/test_dns_recurring.c 4 additions, 4 deletionstests/test_dns_recurring.c
Loading
Please register or sign in to comment