mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-10 23:08:07 +00:00
Make cgsleep_us_r take an int64_t for us.
This commit is contained in:
parent
703c7309c2
commit
ad87db07d9
4
util.c
4
util.c
@ -884,7 +884,7 @@ void timeraddspec(struct timespec *a, const struct timespec *b)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* These are cgminer specific sleep functions that use an absolute nanosecond
|
/* These are cgminer specific sleep functions that use an absolute nanosecond
|
||||||
* resolution timer to avoid pool usleep accuracy and overruns. */
|
* resolution timer to avoid poor usleep accuracy and overruns. */
|
||||||
#ifdef CLOCK_MONOTONIC
|
#ifdef CLOCK_MONOTONIC
|
||||||
void cgsleep_prepare_r(struct timespec *ts_start)
|
void cgsleep_prepare_r(struct timespec *ts_start)
|
||||||
{
|
{
|
||||||
@ -967,7 +967,7 @@ void cgsleep_ms_r(struct timespec *ts_start, int ms)
|
|||||||
nanosleep_abstime(&ts_end);
|
nanosleep_abstime(&ts_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cgsleep_us_r(struct timespec *ts_start, int us)
|
void cgsleep_us_r(struct timespec *ts_start, int64_t us)
|
||||||
{
|
{
|
||||||
struct timespec ts_end;
|
struct timespec ts_end;
|
||||||
|
|
||||||
|
2
util.h
2
util.h
@ -88,7 +88,7 @@ void cgsleep_ms(int ms);
|
|||||||
void cgsleep_us(int64_t us);
|
void cgsleep_us(int64_t us);
|
||||||
void cgsleep_prepare_r(struct timespec *ts_start);
|
void cgsleep_prepare_r(struct timespec *ts_start);
|
||||||
void cgsleep_ms_r(struct timespec *ts_start, int ms);
|
void cgsleep_ms_r(struct timespec *ts_start, int ms);
|
||||||
void cgsleep_us_r(struct timespec *ts_start, int us);
|
void cgsleep_us_r(struct timespec *ts_start, int64_t us);
|
||||||
double us_tdiff(struct timeval *end, struct timeval *start);
|
double us_tdiff(struct timeval *end, struct timeval *start);
|
||||||
double tdiff(struct timeval *end, struct timeval *start);
|
double tdiff(struct timeval *end, struct timeval *start);
|
||||||
bool stratum_send(struct pool *pool, char *s, ssize_t len);
|
bool stratum_send(struct pool *pool, char *s, ssize_t len);
|
||||||
|
Loading…
Reference in New Issue
Block a user