This commit is contained in:
2026-05-11 11:13:54 +02:00
parent c93ae21114
commit c1fd1f706e
11 changed files with 41 additions and 39 deletions

View File

@@ -2,11 +2,12 @@
#define UTILS_H
#include <time.h>
#include <stdbool.h>
uint64_t timespec_diff_us(const struct timespec *a, const struct timespec *b);
void timespec_add_ms(struct timespec *ts, uint16_t ms);
char *pretty_bytes(uint64_t bytes, int8_t start_suffix, char *buf, size_t bufsz);
char *pretty_num(const double num, char *buf, const size_t bufsz);
char *pretty_num(double num, char *buf, size_t bufsz);
void fast_read_num_u64(const char* dir, const char* file, char* buf, uint64_t* result, uint32_t divider);
void fast_read_num_u16(const char* dir, const char* file, char* buf, uint16_t* result, uint32_t divider);