#define MAINLOOP_SPEW 0
-#if MAINLOOP_SPEW
-#ifdef DBUS_ENABLE_VERBOSE_MODE
-static const char*
-watch_flags_to_string (int flags)
-{
- const char *watch_type;
-
- if ((flags & DBUS_WATCH_READABLE) &&
- (flags & DBUS_WATCH_WRITABLE))
- watch_type = "readwrite";
- else if (flags & DBUS_WATCH_READABLE)
- watch_type = "read";
- else if (flags & DBUS_WATCH_WRITABLE)
- watch_type = "write";
- else
- watch_type = "not read or write";
- return watch_type;
-}
-#endif /* DBUS_ENABLE_VERBOSE_MODE */
-#endif /* MAINLOOP_SPEW */
-
struct DBusLoop
{
int refcount;
return NULL;
cb->timeout = timeout;
- _dbus_get_current_time (&cb->last_tv_sec,
- &cb->last_tv_usec);
+ _dbus_get_monotonic_time (&cb->last_tv_sec,
+ &cb->last_tv_usec);
return cb;
}
unsigned long tv_sec;
unsigned long tv_usec;
- _dbus_get_current_time (&tv_sec, &tv_usec);
+ _dbus_get_monotonic_time (&tv_sec, &tv_usec);
link = _dbus_list_get_first_link (&loop->timeouts);
while (link != NULL)
unsigned long tv_sec;
unsigned long tv_usec;
- _dbus_get_current_time (&tv_sec, &tv_usec);
+ _dbus_get_monotonic_time (&tv_sec, &tv_usec);
/* It'd be nice to avoid this O(n) thingy here */
link = _dbus_list_get_first_link (&loop->timeouts);
int
_dbus_get_oom_wait (void)
{
-#ifdef DBUS_BUILD_TESTS
+#ifdef DBUS_ENABLE_EMBEDDED_TESTS
/* make tests go fast */
return 0;
#else