Skip to content

Commit

Permalink
Merge remote-tracking branch 'flatcc/master' into dbv2
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkelfj committed Oct 27, 2023
2 parents a1c9ebe + e1bb2c7 commit ddda400
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/flatcc/support/elapsed.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ extern "C" {
/* Based on http://stackoverflow.com/a/8583395 */
#if !defined(_WIN32)
#include <sys/time.h>
static double elapsed_realtime(void) { // returns 0 seconds first time called
static inline double elapsed_realtime(void) { // returns 0 seconds first time called
static struct timeval t0;
struct timeval tv;
gettimeofday(&tv, 0);
Expand All @@ -23,7 +23,7 @@ static double elapsed_realtime(void) { // returns 0 seconds first time called
#ifndef FatalError
#define FatalError(s) do { perror(s); exit(-1); } while(0)
#endif
static double elapsed_realtime(void) { // granularity about 50 microsecs on my machine
static inline double elapsed_realtime(void) { // granularity about 50 microsecs on my machine
static LARGE_INTEGER freq, start;
LARGE_INTEGER count;
if (!QueryPerformanceCounter(&count))
Expand All @@ -39,7 +39,7 @@ static double elapsed_realtime(void) { // granularity about 50 microsecs on my m

/* end Based on stackoverflow */

static int show_benchmark(const char *descr, double t1, double t2, size_t size, int rep, const char *reptext)
static inline int show_benchmark(const char *descr, double t1, double t2, size_t size, int rep, const char *reptext)
{
double tdiff = t2 - t1;
double nstime;
Expand Down

0 comments on commit ddda400

Please sign in to comment.