rest(3alleg4) Allegro manual rest(3alleg4)NAME
rest - Waits a specified number of milliseconds or yields CPU. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
void rest(unsigned int time);
DESCRIPTION
This function waits for the specified number of milliseconds.
Passing 0 as parameter will not wait, but just yield. This can be useful in order to "play nice" with other processes. Other values will
cause CPU time to be dropped on most platforms. This will look better to users, and also does things like saving battery power and making
fans less noisy.
Note that calling this inside your active game loop is a bad idea, as you never know when the OS will give you the CPU back, so you could
end up missing the vertical retrace and skipping frames. On the other hand, on multitasking operating systems it is good form to give up
the CPU for a while if you will not be using it.
SEE ALSO install_timer(3alleg4), rest_callback(3alleg4), vsync(3alleg4), d_yield_proc(3alleg4)Allegro version 4.4.2 rest(3alleg4)
Hi,
is-it normal to have 86% of CPU for wait commande :
ps aux| head -20
UTIL PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND
root 516 86,6 0,0 12 12 - A 02 nov 2088:03 wait
oralfa01 54422 4,6 1,0 68044 39868 - A 09:20:06 2:27 oracleALFA01
If... (3 Replies)
Hello All
Hope someone can help me with an idea or two on how to approach the following situation;
I currently have a process that generates sequenced files. The sequencing is very important and skipping sequences are not allowed. The applicaton has a single thread that consume data produced... (9 Replies)
Hi All,
I wrote one simple for loop shell script which prints number..but this loop is infinite...but its taking lot of CPU (15.7) %. if i am using sleep cmd then cpu usage become 0.4 %. Is there anyway to reduce this CPU usage without using sleep cmd?
i dont want 2 use sleep cmd... (7 Replies)
Hi All,
I am just curious, not programming anything of my own. I know there are libraries like gmp which does all such things. But I really need to know HOW they do all such things i.e. working with extremely large unimaginable numbers which are beyond the integer limit. They can do add,... (1 Reply)
Hey everyone,
I'm coming from Linux where the top command gave me lots of process
info (particularly CPU time in milliseconds) and I'm trying to find
similar info in Solaris.
So far I've looked at prstat and ps but neither give cpu time in
milliseconds, both seem to have 1 second... (2 Replies)
Guys,
I have a question - when nmon reports a sizeable %CPU wait, does that mean -
1) IO operations are slowing CPU down, OR
2) paging slowing the CPU down, OR
3) one cant tell??
I thought the nmon documentation clearly suggested that CPU waits reported in nmon were from disk... (4 Replies)
Hi Experts,
We encountered problem in one of the production system where some processes were taking higher CPU and after some time it came back to normal..
From system prespective, is there any way to check why processes took more cpu during that particular period. (16 Replies)
EMCP_MOND is utilizing high CPU in one of the AIX server.The EMCP configuration file is same as like the other servers. But only in this server its is utilizing almost 60% of CPU. Any idea ? (5 Replies)