From 8c04f3936822c13acdb6711ccd3159395a96ee0b Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Thu, 4 Jul 2013 16:58:14 +0200 Subject: Make Timer private and calculate elapsed seconds --- test/timer.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'test/timer.h') diff --git a/test/timer.h b/test/timer.h index 272f69d..3367367 100644 --- a/test/timer.h +++ b/test/timer.h @@ -3,15 +3,12 @@ #include -typedef struct { - struct timeval start; - long seconds; - long useconds; -} Timer; +typedef struct _Timer Timer; -Timer * timer_new (void); -void timer_destroy (Timer *t); -void timer_start (Timer *t); -void timer_stop (Timer *t); +Timer * timer_new (void); +void timer_destroy (Timer *t); +void timer_start (Timer *t); +void timer_stop (Timer *t); +double timer_get_seconds (Timer *t); #endif -- cgit v1.2.3