M mkfile => mkfile +2 -1
@@ 2,7 2,8 @@
bins=\
pong\
- maze
+ maze\
+ spiral
all:VQ: $bins
A spiral.c => spiral.c +23 -0
@@ 0,0 1,23 @@
+#include <u.h>
+#include <libc.h>
+#include <draw.h>
+#include <event.h>
+#include <cursor.h>
+
+void
+main(void)
+{
+ double start, end;
+ double lastcos;
+
+ lastcos = 1.0;
+
+ start = cputime();
+ for (int i = 0; i < 100000000; i++)
+ {
+ lastcos = cos(lastcos) + 1.0;
+ }
+ end = cputime();
+
+ print("Calculating 100,000,000 cosines took %fs\n", end - start);
+}