Skip to content
Snippets Groups Projects
Commit bcd848c4 authored by deuce's avatar deuce
Browse files

JS version of cntnodes (As a function)

parent 9c43c175
No related branches found
No related tags found
No related merge requests found
// cntnodes.js
// Counts number of nodes in use and number of nodes waiting for call
// Sets variables NODES_INUSE and NODES_WFC
// Usage: load("cntnodes.js");
// cntnodes();
// $Id$
// @format.tab-size 4, @format.use-tabs true
load("nodedefs.js");
var NODES_INUSE=0;
var NODES_WFC=0;
function cntnodes()
{
var i;
nodes_inuse=0
nodes_wfc=0
for(i=0; i<bbs.nodes; i++) {
if(system.node_list.status & NODE_WFC)
nodes_wfc++;
if(system.node_list[i].status & NODE_INUSE)
nodes_inuse++;
}
writeln("Nodes in use="+nodes_inuse+" Waiting for Caller="+nodes_wfc);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment