From a3732c11ad3bcd2c01a36d0a82a6f310fe8557af Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Wed, 16 Mar 2022 21:56:19 -0700 Subject: Added another test --- include/graphics/lfb.h | 4 ++-- src/tests/test.c | 18 ++++++++++++++++++ 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); } -- cgit v1.2.1