diff src/timertool.c @ 107:069868161f63

Fix bug of get_now()
author Thinker K.F. Li <thinker@branda.to>
date Fri, 12 Sep 2008 12:55:13 +0800
parents 3f619ae03678
children 5df7403b6fbc
line wrap: on
line diff
--- a/src/timertool.c	Fri Sep 12 02:14:27 2008 +0800
+++ b/src/timertool.c	Fri Sep 12 12:55:13 2008 +0800
@@ -37,7 +37,7 @@
 	diff = 0;
     } else {
 	ts = rdtsc();
-	diff += ts - last_ts;
+	diff = ts - last_ts;
 	sdiff = diff / cpufreq;
 	udiff = (diff % cpufreq) * 1000000 / cpufreq;