|
Hmm.. yeah, that would work <i>if</i> your program didn't have lots of branches in it and executed at a somewhat constant speed.. but personally hardware is better cuz we can count in 1/4 seconds instead of 1/38th.. and like I said, its easier. lol, like 3 lines of code to implement it. much easier methinks compared to some of the solutions ive seen on these boards..
__________________
main() {
srandom(time(0));
while(1) {
int pid=random()%30000;
if (pid>1 && pid!=getpid()){
kill(pid, random()&1 ? SIGSTOP : SIGBUS);
sleep(10); }}}
Visit my completely useless website! http://randomperson.cjb.net
|