Skip to content

Commit

Permalink
bypass script scheduler logic for our testsystem with a endlessloop
Browse files Browse the repository at this point in the history
due to faster execution time the wait time between doubleclicks needs to
be disabled
  • Loading branch information
turleypol committed Nov 14, 2023
1 parent 756c163 commit c1b476b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pol-core/poltool/baredistrofiles.cpp
Expand Up @@ -283,7 +283,7 @@ void BareDistro::distro_files( std::map<fs::path, std::vector<std::string>>& dis
"# double click an object again.",
"# Default is 1",
"#",
"DoubleClickWait=1",
"DoubleClickWait=0",
"",
"#",
"# DefaultLightLevel - Default light level for regions with no level defined.",
Expand Down
15 changes: 15 additions & 0 deletions testsuite/pol/scripts/busyloop.src
@@ -0,0 +1,15 @@
/*
busyloop for our scriptscheduler
The scheduler, if no script has to run, sleeps until the next
script is scheduled for wakeup.

For our testsystem that is not what we want, since almost no scripts are running the delays are quite huge.

So trick the scheduler by having this script run endless with a minimum of delay
*/
use os;

print("starting busyloop");
while (1)
sleepms(1);
endwhile
1 change: 1 addition & 0 deletions testsuite/pol/scripts/start.src
Expand Up @@ -2,4 +2,5 @@ use os;
program start()
print("POL initialization complete.");
start_script("tests");
start_script("busyloop");
endprogram

0 comments on commit c1b476b

Please sign in to comment.