1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-09 22:38:01 +00:00

cross-compile: comment out sleep().

Reported as unneded:
https://github.com/veox/sgminer/issues/37

When is this true? Which IDEs, Windows/MinGW versions?
This commit is contained in:
Noel Maersk 2014-01-24 14:46:05 +02:00
parent 08abb9e417
commit 06240b91a6

View File

@ -47,15 +47,16 @@ static inline int nanosleep(const struct timespec *req, struct timespec *rem)
} }
#endif #endif
static inline int sleep(unsigned int secs) /* Reported unneded in https://github.com/veox/sgminer/issues/37 */
{ /* static inline int sleep(unsigned int secs) */
struct timespec req, rem; /* { */
req.tv_sec = secs; /* struct timespec req, rem; */
req.tv_nsec = 0; /* req.tv_sec = secs; */
if (!nanosleep(&req, &rem)) /* req.tv_nsec = 0; */
return 0; /* if (!nanosleep(&req, &rem)) */
return rem.tv_sec + (rem.tv_nsec ? 1 : 0); /* return 0; */
} /* return rem.tv_sec + (rem.tv_nsec ? 1 : 0); */
/* } */
enum { enum {
PRIO_PROCESS = 0, PRIO_PROCESS = 0,