aboutsummaryrefslogtreecommitdiffstats
path: root/src/rate_limiter.h
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2023-11-27 23:35:41 +0200
committerGitHub <noreply@github.com>2023-11-27 23:35:41 +0200
commit2b5f2e24527f04f4255161965ae4099192714b73 (patch)
treeb8edd8485dfcd64c68b12da4221a356acd54a0fa /src/rate_limiter.h
parent47f4cac457c3583548c0d7dba402568a1e0871b8 (diff)
parent95936b647c0283cc6ebd2b685cc5b72889cda8bd (diff)
downloadbindfs-2b5f2e24527f04f4255161965ae4099192714b73.tar.gz
Merge pull request #150 from hartwork/macos-ci
Cover macOS in CI + make CI use the right compiler + fix more compile warnings
Diffstat (limited to 'src/rate_limiter.h')
-rw-r--r--src/rate_limiter.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rate_limiter.h b/src/rate_limiter.h
index 95c0069..4a4ad85 100644
--- a/src/rate_limiter.h
+++ b/src/rate_limiter.h
@@ -30,16 +30,16 @@ extern const double rate_limiter_idle_credit;
typedef struct RateLimiter {
double rate; /* bytes / second */
- double (*clock)();
+ double (*clock)(void);
double last_modified;
double accumulated_sleep_time;
pthread_mutex_t mutex;
} RateLimiter;
-double gettimeofday_clock();
+double gettimeofday_clock(void);
/* 0 on success, error number on error. */
-void rate_limiter_init(RateLimiter* limiter, double rate, double (*clock)());
+void rate_limiter_init(RateLimiter* limiter, double rate, double (*clock)(void));
/* Blocks until the rate limiter clears `size` units. */
void rate_limiter_wait(RateLimiter* limiter, size_t size);
/* Updates the rate limiter like `rate_limiter_wait` but does not actually