mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-21 15:30:10 +01:00
Drop duplicated function tool_millisleep() and use dbus_sleep_milliseconds() instead.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89284 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
parent
6588c65708
commit
43d2455e19
3 changed files with 1 additions and 21 deletions
|
|
@ -89,7 +89,7 @@ filter (DBusConnection *connection,
|
||||||
|
|
||||||
if (sleep_ms > 0)
|
if (sleep_ms > 0)
|
||||||
{
|
{
|
||||||
tool_millisleep (sleep_ms);
|
_dbus_sleep_milliseconds (sleep_ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!noreply)
|
if (!noreply)
|
||||||
|
|
|
||||||
|
|
@ -37,25 +37,6 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* a hack to avoid having to depend on the static -util version of libdbus;
|
|
||||||
* it's useful for ancillary programs to be able to use the shared library */
|
|
||||||
void
|
|
||||||
tool_millisleep (unsigned int ms)
|
|
||||||
{
|
|
||||||
#ifdef DBUS_WIN
|
|
||||||
Sleep (ms);
|
|
||||||
#else
|
|
||||||
fd_set nothing;
|
|
||||||
struct timeval tv;
|
|
||||||
|
|
||||||
tv.tv_sec = ms / 1000;
|
|
||||||
tv.tv_usec = (ms % 1000) * 1000;
|
|
||||||
|
|
||||||
FD_ZERO (¬hing);
|
|
||||||
select (1, ¬hing, ¬hing, ¬hing, &tv);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
tool_oom (const char *doing)
|
tool_oom (const char *doing)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@
|
||||||
#define VERBOSE(...) do {} while (0)
|
#define VERBOSE(...) do {} while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void tool_millisleep (unsigned int ms);
|
|
||||||
void tool_oom (const char *doing) _DBUS_GNUC_NORETURN;
|
void tool_oom (const char *doing) _DBUS_GNUC_NORETURN;
|
||||||
dbus_bool_t tool_write_all (int fd, const void *buf, size_t size);
|
dbus_bool_t tool_write_all (int fd, const void *buf, size_t size);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue