From 33eaaee52bffc7364adea105702b75d21b754c27 Mon Sep 17 00:00:00 2001 From: Georgi Tushev Date: Thu, 8 Sep 2016 00:13:29 +0200 Subject: [PATCH] add time it --- main.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 90c9863..b2c0225 100644 --- a/main.c +++ b/main.c @@ -7,9 +7,31 @@ // #include +#include -int main(int argc, const char * argv[]) { - // insert code here... - printf("Hello, World!\n"); +#include "config.h" +#include "htsutils.h" + +int main(int argc, const char * argv[]) +{ + Settings props; + + /* parse input settings */ + if (parseSettings(argc, argv, &props)) + { + help(); + return EXIT_FAILURE; + } + + clock_t begin = clock(); + + parseBAM(&props); + + clock_t end = clock(); + + double time_spent = (double)(end - begin) / CLOCKS_PER_SEC; + + printf("Time: %.4f sec\n", time_spent); + return 0; }