diff --git a/src/ca/bsd_depen.c b/src/ca/bsd_depen.c index 5c9e2a205..583e3cc10 100644 --- a/src/ca/bsd_depen.c +++ b/src/ca/bsd_depen.c @@ -115,7 +115,12 @@ int cac_select_io(struct timeval *ptimeout, int flags) &autoTimeOut); # endif - cac_gettimeval (&ca_static->currentTime); + /* + * If we have been waiting then update the current time + */ + if (ptimeout->tv_sec>0 || ptimeout->tv_usec>0) { + cac_gettimeval (&ca_static->currentTime); + } if (status<0) { if (MYERRNO == EINTR) {