Skip to content
Browse files

Fixed timer bug.

1 parent 72d0ac0 commit dc7e4884582e12afd774ac871bab7dd47583163a @northWind87 committed Mar 28, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/clocks.c
View
6 src/clocks.c
@@ -35,7 +35,7 @@ clocks.c:
#ifdef PERF_COUNTER
static int64_t temp_large_integer;
- #define times(t) (QueryPerformanceCounter((LARGE_INTEGER*)&temp_large_integer), temp_large_integer);
+ #define times(t) (QueryPerformanceCounter((LARGE_INTEGER*)&temp_large_integer), temp_large_integer)
#elif TIMES
#include <sys/times.h>
@@ -56,7 +56,9 @@ void lprofC_start_timer(int64_t *time_marker) {
}
static int64_t get_clocks(int64_t time_marker) {
- return times(&t) - time_marker;
+ int64_t curTime = times(&t);
+ int64_t diff = curTime - time_marker;
+ return diff;
}
LPFLOAT lprofC_get_seconds(int64_t time_marker) {

0 comments on commit dc7e488

Please sign in to comment.
Something went wrong with that request. Please try again.