aboutsummaryrefslogtreecommitdiff
path: root/src/timer.c
diff options
context:
space:
mode:
authorGertjan van den Burg <burg@ese.eur.nl>2013-10-18 15:48:59 +0200
committerGertjan van den Burg <burg@ese.eur.nl>2013-10-18 15:48:59 +0200
commit6d064658f8ae7ca0f42fef6dcc7f896144e9637b (patch)
treea41e8793f71f637b68f862220ae5566f4537073d /src/timer.c
parentallow seeding of V and added documentation (diff)
downloadgensvm-6d064658f8ae7ca0f42fef6dcc7f896144e9637b.tar.gz
gensvm-6d064658f8ae7ca0f42fef6dcc7f896144e9637b.zip
restart using git
Diffstat (limited to 'src/timer.c')
-rw-r--r--src/timer.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/timer.c b/src/timer.c
new file mode 100644
index 0000000..2187fb2
--- /dev/null
+++ b/src/timer.c
@@ -0,0 +1,8 @@
+#include <time.h>
+
+#include "timer.h"
+
+double elapsed_time(clock_t s_time, clock_t e_time)
+{
+ return ((double) (e_time - s_time))/((double) CLOCKS_PER_SEC);
+}