summary refs log tree commit diff
path: root/tmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmain.c')
-rw-r--r--tmain.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tmain.c b/tmain.c
index 44b6439..0031fc2 100644
--- a/tmain.c
+++ b/tmain.c
@@ -1,8 +1,17 @@
 #include <stdio.h>
+#include <time.h>
+
 extern long f(void);
 
 int main()
 {
-	printf("f() = %ld\n", f());
+	clock_t t0;
+	long l;
+
+	t0 = clock();
+	l = f();
+	t0 = clock() - t0;
+	printf("f() = %ld\n", l);
+	printf("  %.4f secs\n", (double)t0/CLOCKS_PER_SEC);
 	return 0;
 }