Browse Source

[master] Use clockid to avoid "unused variable" warning.

Marcin Siodelski 13 years ago
parent
commit
04a793d345
1 changed files with 3 additions and 1 deletions
  1. 3 1
      tests/tools/perfdhcp/perfdhcp.cc

+ 3 - 1
tests/tools/perfdhcp/perfdhcp.cc

@@ -441,9 +441,11 @@ size_t reqaddr_request6;
 int clock_gettime(int clockid, struct timespec *tp) {
 
     struct timeval tv;
+    int unused_id = clockid;
     gettimeofday(&tv, NULL);
+    unused_id = 0;
     tp->tv_sec = tv.tv_sec;
-    tp->tv_nsec = tv.tv_usec*1000;
+    tp->tv_nsec = tv.tv_usec*1000 + unused_id;
 
     return (0);
 }