var/global/datum/processSchedulerView/processSchedulerView /datum/processSchedulerView /datum/processSchedulerView/Topic(href, href_list) usr_admin_only if (!href_list["action"]) return switch (href_list["action"]) if ("kill") var/toKill = href_list["name"] processScheduler.killProcess(toKill) refreshProcessTable() if ("enable") var/toEnable = href_list["name"] processScheduler.enableProcess(toEnable) refreshProcessTable() if ("disable") var/toDisable = href_list["name"] processScheduler.disableProcess(toDisable) refreshProcessTable() if ("edit") var/toEdit = href_list["name"] processScheduler.editProcess(toEdit) if ("refresh") refreshProcessTable() /datum/processSchedulerView/proc/refreshProcessTable() windowCall("handleRefresh", getProcessTable()) /datum/processSchedulerView/proc/windowCall(var/function, var/data = null) usr << output(data, "processSchedulerContext.browser:[function]") /datum/processSchedulerView/proc/getProcessTable() var/text = "" // and the context of each for (var/list/data in processScheduler.getStatusData()) text += "" text += "" text += "" text += "" text += "" text += "" text += "" text += "" text += "" text += "" text += "
NameAvg(s)Last(s)Highest(s)TickcountTickrateStateAction
[data["name"]][num2text(data["averageRunTime"]/10,3)][num2text(data["lastRunTime"]/10,3)][num2text(data["highestRunTime"]/10,3)][num2text(data["ticks"],4)][data["schedule"]][data["status"]]" if (data["disabled"]) text += "" else text += "" text += "" text += "
" return text /** * getContext * Outputs an interface showing stats for all processes. */ /datum/processSchedulerView/proc/getContext() var/text = {" Process Scheduler Detail

Process Scheduler

The process scheduler controls [processScheduler.getProcessCount()] loops.

"} text += "
" text += getProcessTable() text += "

" usr.Browse(text, "window=processSchedulerContext;size=800x600")