summaryrefslogtreecommitdiff
path: root/os/utils.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-05-26 10:30:56 -0700
committerAdam Jackson <ajax@redhat.com>2016-07-18 15:27:51 -0400
commite6636b438322a9a2f2270ad9d60bf3dfc72be0b3 (patch)
tree60de783adf97d0f009a5edc332a833209a78fbe6 /os/utils.c
parenta414db021575accff64abad6f1047245e81c7476 (diff)
os: Compute timeout in milliseconds instead of struct timeval
The timeout resolution offered in the AdjustWaitForDelay call is only milliseconds, so passing around the timeout as a pointer to a struct timeval is not helpful. Doing everything in milliseconds up to the point of the select call simplifies the code without affecting functionality at all. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'os/utils.c')
-rw-r--r--os/utils.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/os/utils.c b/os/utils.c
index a58603dfe..868a2d6de 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -513,27 +513,6 @@ GetTimeInMicros(void)
#endif
void
-AdjustWaitForDelay(void *waitTime, unsigned long newdelay)
-{
- static struct timeval delay_val;
- struct timeval **wt = (struct timeval **) waitTime;
- unsigned long olddelay;
-
- if (*wt == NULL) {
- delay_val.tv_sec = newdelay / 1000;
- delay_val.tv_usec = 1000 * (newdelay % 1000);
- *wt = &delay_val;
- }
- else {
- olddelay = (*wt)->tv_sec * 1000 + (*wt)->tv_usec / 1000;
- if (newdelay < olddelay) {
- (*wt)->tv_sec = newdelay / 1000;
- (*wt)->tv_usec = 1000 * (newdelay % 1000);
- }
- }
-}
-
-void
UseMsg(void)
{
ErrorF("use: X [:<display>] [option]\n");