summaryrefslogtreecommitdiff
path: root/src/common/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/utils.h')
-rw-r--r--src/common/utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/utils.h b/src/common/utils.h
index da2a29317..c5f64124f 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -24,6 +24,9 @@
#include "common/hercules.h"
#include <stdio.h> // FILE*
+#ifndef WIN32
+# include <unistd.h> // sleep()
+#endif
/* [HCache] 1-byte key to ensure our method is the latest, we can modify to ensure the method matches */
#define HCACHE_KEY 'k'
@@ -42,6 +45,9 @@ bool exists(const char* filename);
/// calculates the value of A / B, in percent (rounded down)
unsigned int get_percentage(const unsigned int A, const unsigned int B);
+int64 apply_percentrate64(int64 value, int rate, int maxrate);
+int apply_percentrate(int value, int rate, int maxrate);
+
const char* timestamp2string(char* str, size_t size, time_t timestamp, const char* format);
//////////////////////////////////////////////////////////////////////////