[sr-dev] git:master: benchmark: fixed bug/typo in calculating time diff ; )

Jason Penton jason.penton at gmail.com
Mon Sep 17 10:56:34 CEST 2012


Module: sip-router
Branch: master
Commit: d9b009ef3c430f6ea064b4a72d5b94ce842ede1d
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d9b009ef3c430f6ea064b4a72d5b94ce842ede1d

Author: Jason Penton <jason.penton at smilecoms.com>
Committer: Jason Penton <jason.penton at smilecoms.com>
Date:   Mon Sep 17 10:55:48 2012 +0200

benchmark: fixed bug/typo in calculating time diff ;)

---

 modules_k/benchmark/benchmark.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules_k/benchmark/benchmark.h b/modules_k/benchmark/benchmark.h
index cc4e68e..dec7e44 100644
--- a/modules_k/benchmark/benchmark.h
+++ b/modules_k/benchmark/benchmark.h
@@ -88,8 +88,8 @@ inline unsigned long long bm_diff_time(bm_timeval_t *t1, bm_timeval_t *t2)
 {
 	unsigned long long tdiff;
 
-	tdiff = t1->tv_sec - t1->tv_sec;
-	
+	tdiff = t2->tv_sec - t1->tv_sec;
+
 #ifdef BM_CLOCK_REALTIME
 	tdiff = tdiff*1000000000 + t2->tv_nsec - t1->tv_nsec;
 #else




More information about the sr-dev mailing list