summaryrefslogtreecommitdiff
path: root/tests/suite/mini-record-timing.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2013-04-28 11:15:47 +0300
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-04-28 11:15:47 +0300
commitb5916182650e289804c5acf2d97f0db351d5d081 (patch)
treec02cfd1d5d28183a735bf2ebc2951cdf39ef8b7d /tests/suite/mini-record-timing.c
parent24439b0ba094a590e837d7be362da0584103391a (diff)
downloadgnutls-b5916182650e289804c5acf2d97f0db351d5d081.tar.gz
Avoid linking the library on librt.
Diffstat (limited to 'tests/suite/mini-record-timing.c')
-rw-r--r--tests/suite/mini-record-timing.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/suite/mini-record-timing.c b/tests/suite/mini-record-timing.c
index e41d45b689..a4589b26ee 100644
--- a/tests/suite/mini-record-timing.c
+++ b/tests/suite/mini-record-timing.c
@@ -48,7 +48,6 @@ int main()
#include <errno.h>
#include <time.h>
-#include <timespec.h>
#include <sys/time.h>
#include <sys/resource.h>
@@ -338,7 +337,7 @@ restart:
ret = gnutls_record_send (session, text, sizeof(text));
} while (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED);
/* measure peer's processing time */
- gettime(&start);
+ clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &start);
#define TLS_RECV
#ifdef TLS_RECV
@@ -353,7 +352,7 @@ restart:
if (taken < MAX_MEASUREMENTS(test->npoints) && ret > 0)
{
- gettime(&stop);
+ clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &stop);
taken++;
measurement = timespec_sub_ns(&stop, &start);
prev_point_ptr->measurements[prev_point_ptr->midx] = measurement;