aboutsummaryrefslogtreecommitdiff
path: root/seq-read.c
diff options
context:
space:
mode:
Diffstat (limited to 'seq-read.c')
-rw-r--r--seq-read.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/seq-read.c b/seq-read.c
deleted file mode 100644
index 90d201f..0000000
--- a/seq-read.c
+++ /dev/null
@@ -1,20 +0,0 @@
1#include <stdio.h>
2#include <stdlib.h>
3#include <time.h>
4
5int
6main(void)
7{
8 clock_t start = clock();
9 size_t sum = 0;
10
11 for ( int ch; (ch = getc(stdin)) != EOF; ) {
12 sum += (unsigned char) ch;
13 }
14
15 clock_t end = clock();
16
17 printf("Result: %zu, Duration: %.3lf sec\n", sum, ((double)(end - start)) / CLOCKS_PER_SEC);
18
19 return EXIT_SUCCESS;
20}