From 9259ec5732851dd66f7c598d629e3808ac7ab3d8 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 3 Nov 2002 14:29:34 +0000 Subject: new timer infrastructure. takes a function pointer for the timeout, with a void* parameter (useful for holding a class instance!) --- src/util.cc | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/util.cc') diff --git a/src/util.cc b/src/util.cc index 6a6ac417..77913952 100644 --- a/src/util.cc +++ b/src/util.cc @@ -83,29 +83,6 @@ string textPropertyToString(Display *display, XTextProperty& text_prop) { } -timeval normalizeTimeval(const timeval &tm) { - timeval ret = tm; - - while (ret.tv_usec < 0) { - if (ret.tv_sec > 0) { - --ret.tv_sec; - ret.tv_usec += 1000000; - } else { - ret.tv_usec = 0; - } - } - - if (ret.tv_usec >= 1000000) { - ret.tv_sec += ret.tv_usec / 1000000; - ret.tv_usec %= 1000000; - } - - if (ret.tv_sec < 0) ret.tv_sec = 0; - - return ret; -} - - string itostring(unsigned long i) { if (i == 0) return string("0"); -- cgit v1.2.3