MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / get_time_diff

Function get_time_diff

ut.h:1386–1395  ·  view source on GitHub ↗

Note: limited to a max time diff of 2147 * 10^6 useconds! */

Source from the content-addressed store, hash-verified

1384
1385/* Note: limited to a max time diff of 2147 * 10^6 useconds! */
1386static inline int get_time_diff(struct timeval *begin)
1387{
1388 struct timeval end;
1389
1390 gettimeofday(&end, NULL);
1391
1392 /* difference is returned in microseconds */
1393 return (long long)(end.tv_sec*1000000 + end.tv_usec)
1394 - (long long)(begin->tv_sec*1000000 + begin->tv_usec);
1395}
1396
1397static inline unsigned long long get_clock_diff(struct timespec *begin)
1398{

Callers 7

stream_cleanup_oldFunction · 0.85
ws_client_handshakeFunction · 0.85
jsonrpc_handle_cmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected