Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
darkk committed Aug 29, 2024
1 parent 87426ad commit 94b3e5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ void SetAffinity ( int cpu );
// That's not UINT64_MAX as it's converted to int64_t sometimes.
constexpr uint64_t timer_inf = INT64_MAX;

__inline__ uint64_t timer_sub(uint64_t a, uint64_t b)
static inline uint64_t timer_sub(uint64_t a, uint64_t b)
{
#if defined(__mips__)
// Tune SafeMHzFor32CC to reflect max clock freq. of your machine with 32-bit cycle counter.
const uint32_t SafeMHzFor32CC = 1500;

if ((a >> 60) != (b >> 60)) return timer_inf;
const uint32_t scale = (a >> 60) + 1;
const uint32_t acc = a & UINT32_MAX, bcc = b & UINT32_MAX;
Expand Down

0 comments on commit 94b3e5e

Please sign in to comment.