I'm using a function to get the server load:
function get_server_cpu_usage(){
$load = sys_getloadavg();
return $load[1];
}
I call it with:
<div id="load"><?= get_server_cpu_usage(); ?></div>
I need to implement something to update this information every second, without the page being updated, something like the setTimeout or setInterval of JS.
How can I do this in this case?