[ 1916373 ] InfoUpdater background thread read sys config value in loop

This commit is contained in:
Heng Sin Low 2008-03-17 06:06:21 +00:00
parent 34dea236ee
commit 0f970af92c
1 changed files with 22 additions and 18 deletions

View File

@ -674,6 +674,8 @@ public final class AMenu extends CFrame
// if (percent > 50)
// System.gc();
if (DB.isConnected())
{
// Requests
int requests = getRequests();
bRequests.setText(Msg.translate(m_ctx, "R_Request_ID") + ": " + requests);
@ -691,6 +693,7 @@ public final class AMenu extends CFrame
);
*/
MSystem.get(m_ctx).info();
}
} // updateInfo
@ -770,12 +773,13 @@ public final class AMenu extends CFrame
public void run()
{
int sleep = MSysConfig.getIntValue("MENU_INFOUPDATER_SLEEP_MS", 60000, Env.getAD_Client_ID(Env.getCtx()));
while(stop == false)
{
updateInfo();
try {
Thread.sleep(MSysConfig.getIntValue("MENU_INFOUPDATER_SLEEP_MS", 60000, Env.getAD_Client_ID(Env.getCtx())));
Thread.sleep(sleep);
} catch(InterruptedException ire) { }
}
}