aboutsummaryrefslogtreecommitdiff
path: root/src
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 /src
parent495b3fd9d43a0eee1ab9effbb021a9d7e2c4f52d (diff)
Added another test
Diffstat (limited to 'src')
-rw-r--r--src/tests/test.c18
1 files changed, 18 insertions, 0 deletions
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);
}