View Single Post
  #1  
Old 05-01-2013, 10:00 PM
dylan dylan is offline
AGT
Join Date: Jul 2012
Location: United States
Posts: 60
dylan has a spectacular aura about
Quote:
Originally Posted by DustyPorViva View Post
Where are you getting this CPU usage from? Looks like it's from your PC, in which it doesn't reflect the server at all? I'm confused.
It's a custom onRCChat() command. Checks if the chat is /npccpu then gives that stat.
PHP Code:
function onRCChat() {
    switch (
params[0]) {
        case 
"cpu": {
            
printf("CPU Usage: %i%%, Process Uptime: %f days",getprocesscpuusage()*100int((getprocessuptime()/86400) / 0.05) * 0.05);
        break;
        }
    }

Edit:
So yes, it's pulling CPU usage from server.
__________________

<@Logan> I spent a minute looking at my own code by accident.
<@Logan> I was thinking "What the hell is this guy doing?"
Reply With Quote