aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-16 21:56:19 -0700
committerChristian Cunningham <cc@localhost>2022-03-16 21:56:19 -0700
commita3732c11ad3bcd2c01a36d0a82a6f310fe8557af (patch)
tree52c7e2aac6bf684911b8ff7dea016ffb8f06f8fc
parent495b3fd9d43a0eee1ab9effbb021a9d7e2c4f52d (diff)
Added another test
-rw-r--r--include/graphics/lfb.h4
-rw-r--r--src/tests/test.c18
2 files changed, 20 insertions, 2 deletions
diff --git a/include/graphics/lfb.h b/include/graphics/lfb.h
index 2034c75..8184959 100644
--- a/include/graphics/lfb.h
+++ b/include/graphics/lfb.h
@@ -1,8 +1,8 @@
#ifndef GRAPHICS_LFB_H
#define GRAPHICS_LFB_H
-#define GG_MAX_X 128
-#define GG_MAX_Y 100
+#define GG_MAX_X 240
+#define GG_MAX_Y 67
#define DRAW64(x,y,v) draw_hex32(x,y,v>>32);draw_hex32(x+8,y,v);
diff --git a/src/tests/test.c b/src/tests/test.c
index 172e411..91b400e 100644
--- a/src/tests/test.c
+++ b/src/tests/test.c
@@ -35,6 +35,7 @@ void test_entry(void)
// atest
//add_thread(atest, 0, 0);
+ dt = 0;
for(int i = 0; i < 64; i++) {
sys0_64(SYS_TIME, &ti);
sys0(SYS_YIELD);
@@ -49,6 +50,23 @@ void test_entry(void)
}
DRAW64(35, y+5, dt/64);
DRAW64(35+17, y+5, dt%64);
+
+ z = 1;
+ dt = 0;
+ for(int i = 0; i < 64; i++) {
+ sys0_64(SYS_TIME, &ti);
+ add_thread(atest, 0, 0);
+ sys0_64(SYS_TIME, &tf);
+ dt += tf - ti;
+ if (z % 2) {
+ DRAW64(70+17, y+((z+1)/2)+5, (tf-ti));
+ } else {
+ DRAW64(70, y+(z/2)+5, (tf-ti));
+ }
+ z++;
+ }
+ DRAW64(70, y+5, dt/64);
+ DRAW64(70+17, y+5, dt%64);
add_thread(btest, 0, 4);
}