Skip to contentSkip to conversation

tst_timer.h: Cosmetic fix

PATCH New Guangwen Feng 3 participants 3 messages Jul 26, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tst_timer.h: Cosmetic fix

---
 include/tst_timer.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/tst_timer.h +3 -3
index 48d7c7b..1b00e3c 100644
@@ -95,12 +95,12 @@ static inline struct timeval tst_us_to_timeval(long long us)
 /*
  * Converts ms to struct timespec
  */
-static inline struct timespec tst_ms_to_timespec(long long us)
+static inline struct timespec tst_ms_to_timespec(long long ms)
 {
 	struct timespec ret;
 
-	ret.tv_sec = us / 1000;
-	ret.tv_nsec = (us % 1000) * 1000000;
+	ret.tv_sec = ms / 1000;
+	ret.tv_nsec = (ms % 1000) * 1000000;
 
 	return ret;
 }
Signature · 1 line
2.9.4
#1 lore raw

PATCH 1/1 tst_timer.h: Cosmetic fix

include/tst_timer.h static inline struct timeval tst_us_to_timeval(long long us) · line 103

Quoted 12 lines

/*
* Converts ms to struct timespec
*/

include/tst_timer.h +3 -3
-static inline struct timespec tst_ms_to_timespec(long long us)
+static inline struct timespec tst_ms_to_timespec(long long ms)
 {
 	struct timespec ret;
 
-	ret.tv_sec = us / 1000;
-	ret.tv_nsec = (us % 1000) * 1000000;
+	ret.tv_sec = ms / 1000;
+	ret.tv_nsec = (ms % 1000) * 1000000;

Oh yes, us was a bit confusing :-).

Kind regards,
Petr