aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-18 16:16:12 -0700
committerChristian Cunningham <cc@localhost>2022-03-18 16:16:12 -0700
commitc0dab6412df6301802730c871b18583b4cfdcb76 (patch)
tree35f2dad296c8293153c5dbdc4453454f677a3cba
parent1fbbb6f15fef8e958b57728d59d1912aeea7c7c6 (diff)
Another test
-rw-r--r--src/tests/test.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/tests/test.c b/src/tests/test.c
index 0c3ffb0..100aa37 100644
--- a/src/tests/test.c
+++ b/src/tests/test.c
@@ -55,7 +55,7 @@ void test_entry(void)
dt = 0;
for(int i = 0; i < 64; i++) {
sys0_64(SYS_TIME, &ti);
- add_thread(atest, 0, 0);
+ add_thread(atest, 0, 3);
sys0_64(SYS_TIME, &tf);
dt += tf - ti;
if (z % 2) {
@@ -67,6 +67,23 @@ void test_entry(void)
}
DRAW64(70, y+5, dt/64);
DRAW64(70+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(105+17, y+((z+1)/2)+5, (tf-ti));
+ } else {
+ DRAW64(105, y+(z/2)+5, (tf-ti));
+ }
+ z++;
+ }
+ DRAW64(105, y+5, dt/64);
+ DRAW64(105+17, y+5, dt%64);
add_thread(btest, 0, 4);
}
@@ -146,6 +163,10 @@ void stest2(void)
void btest(void)
{
+ draw_string(0, y+0, " ");
+ draw_string(0, y+1, " ");
+ draw_string(0, y+2, " ");
+ draw_string(0, y+3, " ");
x = 0;
add_thread(ctest1, 0, 3);
add_thread(stest1, 0, 6);