/****************************************************************************
- * Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
# endif
#endif
-MODULE_ID("$Id: lib_twait.c,v 1.52 2006/12/30 16:56:28 tom Exp $")
-
-#if HAVE_GETTIMEOFDAY
-# define PRECISE_GETTIME 1
-# define TimeType struct timeval
-#else
-# define PRECISE_GETTIME 0
-# define TimeType time_t
-#endif
+MODULE_ID("$Id: lib_twait.c,v 1.55 2008/03/01 22:08:31 tom Exp $")
static long
_nc_gettime(TimeType * t0, bool first)
{
int fd;
int count;
- int result;
+ int result = 0;
TimeType t0;
#ifdef NCURSES_WGETCH_EVENTS
}
#endif
-#if PRECISE_GETTIME
+#if PRECISE_GETTIME && HAVE_NANOSLEEP
retry:
#endif
starttime = _nc_gettime(&t0, TRUE);