]> git.sur5r.net Git - cc65/commitdiff
simple test program for clock() function
authorcpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 6 Nov 2001 22:02:27 +0000 (22:02 +0000)
committercpg <cpg@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 6 Nov 2001 22:02:27 +0000 (22:02 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@1104 b7a2c559-68d2-44c3-8de9-860c34a00d81

testcode/lib/clock.c [new file with mode: 0644]

diff --git a/testcode/lib/clock.c b/testcode/lib/clock.c
new file mode 100644 (file)
index 0000000..7991058
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * simple clock test
+ *
+ * 06-Nov-2001, Christian Groessler
+ */
+
+#include <stdio.h>
+#include <conio.h>
+#include <time.h>
+
+int main(void)
+{
+  printf("\ncc65 time routines test program\n");
+  printf("-------------------------------\n");
+
+  printf("clocks per second: %d\n", CLOCKS_PER_SEC);
+  printf("current clock: %ld\n", clock());
+
+#ifdef __ATARI__
+  /* Atari DOS 2.x clears the screen after program termination, so wait... */
+  printf("hit <return> to exit...");
+  cgetc();
+#endif
+  printf("\n");
+  return(0);
+}
+