moved the resource monitoring from 'Config_readinAny' to a library

This commit is contained in:
joten 2012-09-30 19:50:12 +02:00
parent a276043d59
commit ea332e413a
2 changed files with 4 additions and 28 deletions

View file

@ -210,37 +210,12 @@ Return
Config_readinAny() Config_readinAny()
{ ;; Add information to the variable 'text' in this function to display it in the status bar. { ;; Add information to the variable 'text' in this function to display it in the status bar.
Global Config_readinCpu, Config_readinDate, Config_readinDiskLoad, Config_readinMemoryUsage, Config_readinNetworkLoad Global Config_readinDate
text := "" text := ""
If Config_readinCpu text .= ResourceMonitor_getText()
text .= " CPU: " Bar_getSystemTimes() "% " If Config_readinDate
If Config_readinMemoryUsage
{
If Config_readinCpu
text .= "|"
text .= " RAM: " Bar_getMemoryUsage() "% "
}
If Config_readinDiskLoad
{
If (Config_readinCpu Or Config_readinMemoryUsage)
text .= "|"
Bar_getDiskLoad(rLoad, wLoad)
text .= " Dr: " rLoad "% | Dw: " wLoad "% "
}
If Config_readinNetworkLoad
{
If (Config_readinCpu Or Config_readinMemoryUsage Or Config_readinDiskLoad)
text .= "|"
Bar_getNetworkLoad(upLoad, dnLoad)
text .= " UP: " upLoad " KB/s | dn: " dnLoad " KB/s "
}
If Config_readinDate
{
If (Config_readinCpu Or Config_readinMemoryUsage Or Config_readinDiskLoad Or Config_readinNetworkLoad)
text .= "|"
text .= " " A_DDD ", " A_DD ". " A_MMM ". " A_YYYY " " text .= " " A_DDD ", " A_DD ". " A_MMM ". " A_YYYY " "
}
Return, text Return, text
} }

View file

@ -114,4 +114,5 @@ Return
#Include Debug.ahk #Include Debug.ahk
#Include Manager.ahk #Include Manager.ahk
#Include Monitor.ahk #Include Monitor.ahk
#Include ResourceMonitor.ahk
#Include View.ahk #Include View.ahk