View Single Post
  #9   Spotlight this post!  
Unread 09-02-2003, 23:19
randomperson's Avatar
randomperson randomperson is offline
Assembler Freak
#0904
Team Role: College Student
 
Join Date: Dec 2002
Rookie Year: 2003
Location: Wyoming,MI
Posts: 100
randomperson is an unknown quantity at this point
Send a message via AIM to randomperson Send a message via MSN to randomperson
Blah...

I keep seeing posts on timer this, timer that.. why use software timers? So inaccurate if you have lots of code.. I mean, the loop isn't always a set period of time if you mod the code a lot (yeah, we aren't really using anything in the default code except the declarations.. and most of those are gone too.. lol). Using a hardware pulse generator (555 anyone?) allows you to have multiple software timers without worrying too much about loop periods and other useless complex crapola. I mean, you only need a resolution of around 1/4 second at most anyways..
__________________
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

Last edited by randomperson : 09-02-2003 at 23:25.