Skip to content

Commit

Permalink
chore(utils): moved core/utils to utils library.
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
  • Loading branch information
FedeDP committed Sep 10, 2022
1 parent 1daae5e commit 51dc7c5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Lib/core/utils.c → Lib/utils/utils.c
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
#include "utils.h"
#include <time.h>

/*******************************************
* Code related to generic priv utilities. *
*******************************************/

/** Private API **/

void fetch_ms(uint64_t *val, uint64_t *ctr) {
struct timespec spec;
#ifdef __linux__
#ifdef __linux__
clock_gettime(CLOCK_BOOTTIME, &spec);
#else
#else
clock_gettime(CLOCK_MONOTONIC, &spec);
#endif
#endif
*val = spec.tv_sec * 1000 + spec.tv_nsec / 1000000;

if (ctr) {
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- [x] Fix build on bsd
- [x] Fix libmodule_thpool.pc (-l-pthread)
- [x] Move core/utils.c under utils_internal library

### Logging

Expand Down

0 comments on commit 51dc7c5

Please sign in to comment.