diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2008-11-28 11:03:28 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2008-11-28 11:03:28 +0000 |
commit | 67a38decce3c8f4039f48cbb51df7f78550f6c8b (patch) | |
tree | 8fd40635f8453ac6362aafe2e4dccbd8d8377daf /src | |
parent | 61a05530b104c7cab018f691b4678824d04de9fa (diff) | |
download | virt-viewer-67a38decce3c8f4039f48cbb51df7f78550f6c8b.tar.gz virt-viewer-67a38decce3c8f4039f48cbb51df7f78550f6c8b.tar.xz virt-viewer-67a38decce3c8f4039f48cbb51df7f78550f6c8b.zip |
Remove unused usleep code
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 4 | ||||
-rw-r--r-- | src/usleep.c | 61 |
2 files changed, 0 insertions, 65 deletions
@@ -51,10 +51,6 @@ #include "viewer.h" -#ifndef HAVE_USLEEP -int usleep (unsigned int usecs); -#endif - // #define DEBUG 1 #ifdef DEBUG #define DEBUG_LOG(s, ...) g_debug((s), ## __VA_ARGS__) diff --git a/src/usleep.c b/src/usleep.c deleted file mode 100644 index 95a09c5..0000000 --- a/src/usleep.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Virt Viewer: A virtual machine console viewer - * - * Copyright (C) 2008 Red Hat. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Author: Richard W.M. Jones <rjones@redhat.com> - */ - -/* Replacement usleep function, only used on platforms which lack - * this system or library function. - */ - -#include <config.h> - -#ifdef HAVE_WINDOWS_H -#include <windows.h> -#endif - -#ifdef WIN32 - -int -usleep (unsigned int usecs) -{ - unsigned int msecs = usecs / 1000; - if (msecs < 1) - Sleep (1); - else - Sleep (msecs); -} - -#else - -int -usleep (unsigned int usecs) -{ - /* This sucks, but everything has sleep and it's not - * really that critical how long we sleep for in the - * main code. - */ - unsigned int secs = usecs / 1000000; - if (secs < 1) - sleep (1); - else - sleep (secs); -} - -#endif |