aboutsummaryrefslogtreecommitdiff
path: root/src/tests/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/test.c')
-rw-r--r--src/tests/test.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/tests/test.c b/src/tests/test.c
index 247465e..f2f3e6b 100644
--- a/src/tests/test.c
+++ b/src/tests/test.c
@@ -1,17 +1,18 @@
#include <cpu.h>
#include <drivers/uart.h>
-
-void utime(void);
+#include <graphics/lfb.h>
+#include <lib/kmem.h>
+#include <sys/core.h>
void test_entry(void)
{
-}
-
-void utime(void)
-{
- unsigned long long ti, tf, dt;
- sys0_64(SYS_TIME, &ti);
- sys0_64(SYS_TIME, &tf);
- dt = tf - ti;
- PRINT64(dt);
+ draw_string(0, 18, "Starting tests");
+ unsigned long long ti, tf, dt=0;
+ for(int i = 0; i < 64; i++) {
+ sys0_64(SYS_TIME, &ti);
+ sys0_64(SYS_TIME, &tf);
+ dt += tf - ti;
+ }
+ DRAW64(0, 19, dt/64);
+ DRAW64(17, 19, dt%64);
}