Skip to content

Commit

Permalink
Remove mach_absolute_time reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliu committed Mar 14, 2024
1 parent e4f7e0b commit 99bb340
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions lib/nnc/ccv_nnc_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
#include <time.h>
#include <sys/time.h>

#ifdef __MACH__
#include <mach/mach.h>
#include <mach/mach_time.h>
#endif

typedef struct {
const uint32_t cmd;
const char* name;
Expand Down Expand Up @@ -304,13 +299,9 @@ int ccv_nnc_cmd_enforce_inplace(const ccv_nnc_cmd_t cmd, const int input_idx, co
// This returns absolute time.
uint64_t ccv_nnc_cmd_mono_time(void)
{
#ifdef __MACH__
return mach_absolute_time();
#else
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return ts.tv_sec * 1000000000ULL + ts.tv_nsec;
#endif
}

uint32_t ccv_nnc_cmd_find_backend(const ccv_nnc_cmd_t cmd, const int tensor_memory, const int tensor_formats, const int tensor_datatypes)
Expand Down

0 comments on commit 99bb340

Please sign in to comment.