add a library of timeval manipulation functions, and change a large number of usses to use the new functions (bug #4504)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-07-15 23:00:47 +00:00
parent 60cd1fa57d
commit 22b0f5d306
39 changed files with 420 additions and 635 deletions

View File

@@ -107,12 +107,12 @@ static void __verboser(const char *stuff, int opos, int replacelast, int complet
if (replacelast)
gtk_clist_remove(GTK_CLIST(verb), GTK_CLIST(verb)->rows - 1);
gtk_clist_append(GTK_CLIST(verb), s2);
if (last.tv_sec || last.tv_usec) {
if (!ast_tvzero(last)) {
gdk_threads_leave();
gettimeofday(&tv, NULL);
if (cleanupid > -1)
gtk_timeout_remove(cleanupid);
ms = (tv.tv_sec - last.tv_sec) * 1000 + (tv.tv_usec - last.tv_usec) / 1000;
ms = ast_tvdiff_ms(tv, last);
if (ms < 100) {
/* We just got a message within 100ms, so just schedule an update
in the near future */