Howto:Reset/re-init Troubleshooting: Difference between revisions

Jump to navigation Jump to search
Line 503: Line 503:
var performance_monitor = props.globals.getNode('/sim/performance-monitor');
var performance_monitor = props.globals.getNode('/sim/performance-monitor');


var subsystemListTimer = maketimer(0.5, func(){
var subsystemListTimer = maketimer(1.5, func(){
    gui.popupTip("Getting list of known subsystems from the performance monitor ...",1.5);
     foreach(var s; performance_monitor.getNode("subsystems").getChildren('subsystem') ) {
     foreach(var s; performance_monitor.getNode("subsystems").getChildren('subsystem') ) {
     var name = s.getNode('name').getValue();
     var name = s.getNode('name').getValue();
     print("Subsystem found:", name);
     print("Subsystem found:", name);
     append(Tests, {name: name});
     append(Tests, {name: name});
    }
 
print("subsystem list retrieved, disabling performance monitor again");  
print("subsystem list retrieved, disabling performance monitor again");  
performance_monitor.getNode('enabled').setBoolValue(0); # disable the performance monitor again
performance_monitor.getNode('enabled').setBoolValue(0); # disable the performance monitor again


}
   
   
debug.benchmark("button setup", func() {
debug.benchmark("button setup", func() {
Line 578: Line 578:
performance_monitor.getNode('enabled').setBoolValue(1);  
performance_monitor.getNode('enabled').setBoolValue(1);  
subsystemListTimer.singleShot = 1; # timer will only be run once
subsystemListTimer.singleShot = 1; # timer will only be run once
gui.popupTip("Getting list of known subsystems from the performance monitor ...",1.5);
subsystemListTimer.start();
subsystemListTimer.start();


Navigation menu