#include <libextl/readconfig.h>
#include <libmainloop/exec.h>
#include <libmainloop/select.h>
+#include <libmainloop/signal.h>
#include <ioncore/saveload.h>
#include <ioncore/bindmaps.h>
#include <ioncore/global.h>
+#include <ioncore/ioncore.h>
#include "statusbar.h"
#include "exports.h"
-#define CF_STATUSD_TIMEOUT_SEC 5
+#define CF_STATUSD_TIMEOUT_SEC 3
/*{{{ Module information */
int retval;
bool dummy, doneseen, eagain=FALSE;
- if(gettimeofday(&endtime, NULL)!=0){
+ if(mainloop_gettime(&endtime)!=0){
warn_err();
return FALSE;
}
goto timeout;
}
- if(gettimeofday(&now, NULL)!=0){
+ if(mainloop_gettime(&now)!=0){
warn_err();
return FALSE;
}
return TRUE;
timeout:
- warn(TR("ion-statusd timed out."));
- return FALSE;
+ /* Just complain to stderr, not startup error log, and do not fail.
+ * The system might just be a bit slow. We can continue, but without
+ * initial values for the meters, geometry adjustments may be necessary
+ * when we finally get that information.
+ */
+ ioncore_warn_nolog(TR("ion-statusd timed out."));
+ return TRUE;
}