From skodak at cs.umn.edu Mon Apr 8 19:09:50 2002 From: skodak at cs.umn.edu (Sreekumar Kodakara) Date: Mon Jan 17 14:29:34 2005 Subject: [TCLUG-DEVEL] Timers in Linux - Newbie question Message-ID: Hi I want to call a function periodically, say every 5 seconds. Is there any timer functions which will help me do that? I am using RedHat linux 6.1. Thanks for the help in advance. Sreekumar From hopper at omnifarious.org Mon Apr 8 19:21:41 2002 From: hopper at omnifarious.org (Eric M. Hopper) Date: Mon Jan 17 14:29:34 2005 Subject: [TCLUG-DEVEL] Timers in Linux - Newbie question In-Reply-To: References: Message-ID: <1018311701.2623.14.camel@monster.omnifarious.org> On Mon, 2002-04-08 at 19:09, Sreekumar Kodakara wrote: > Hi > I want to call a function periodically, say every 5 seconds. Is there any > timer functions which will help me do that? I am using > RedHat linux 6.1. Thanks for the help in advance. There are ways to have this happen, but most of them are a big pain. What method is best depends a lot on what the rest of your program does. One method is to use 'sleep' to get a 5 second delay. Another is to deal with all the wonders and pitfalls of signal handling. You set up a handler for SIGALRM using the sigaction call and use setitimer to set up an interval timer that will send you SIGALRM at specified intervals. A last way is if you have a program that's based on an event loop. You can carefully track the time and give strategic values for the timeout arguments to select or poll so you get control back at the right time. If you're doing C++ and are interested in a whole framework for dealing with Unix in an event oriented fashion, you might want to look into my StreamModule libraries (http://www.omnifarious.org/StrMod). Have fun (if at all possible), -- The best we can hope for concerning the people at large is that they be properly armed. -- Alexander Hamilton -- Eric Hopper (hopper@omnifarious.org http://www.omnifarious.org/~hopper) -- -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 228 bytes Desc: This is a digitally signed message part Url : http://shadowknight.real-time.com/pipermail/tclug-devel/attachments/20020408/ae6ad766/attachment.pgp From merlin at kewlness.net Mon Apr 8 23:52:21 2002 From: merlin at kewlness.net (T.J. Duchene) Date: Mon Jan 17 14:29:34 2005 Subject: [TCLUG-DEVEL] Re: tclug-devel digest, Vol 1 #79 - 13 msgs References: <200204090023.g390N1h10435@sprite.real-time.com> Message-ID: <000901c1df82$5703e4a0$093c11c7@greenskull> > > Message: 7 > Date: Tue, 05 Mar 2002 07:17:51 -0600 > From: Tom Howard > To: tclug-devel@mn-linux.org > Subject: [TCLUG-DEVEL] Request for assistance for a beginner > > I'm just getting started w/Linux and am having no luck trying to > configure my computer to hook up to the internet. I'm running Red Hat & > other versions, and jockeying two modems around trying to find a > connection. I can bring my computer to someone in the Twin Cities > area, if there is someone from whom I could purchase some basic > technical assistance. Thanks, Tom If I may make a suggestion on that score. For new users, the best dial-up PPP utility I know of under RedHat (depending on the version) is wvdial. Assuming your system's modem is not a "win-modem" and you have PPP support enabled, wvdial w/ the autoconfigure option will automatically detect and setup modem based on user responses. If you want me to walk you through the process, drop me a note at linuxman@worldwebcafe.com. Granted, RedHat 6.2 is rather primitive compared to Debian or Mandrake. I would suggest that if this is your very first experience with Linux, and you are not going to run a server, try Mandrake 8.2. With Mandrake 8.2, however, you want to make sure that you disable the IDEA cryptography modules in KDE, as they are illegal to use in the US without a user license from the patent holder. But that's no big deal, I can help you with that if you go that route. Mandrake will also configure your dialer for you during the install process, by prompting you for the number, etc, as well as autodetect your modem. If you are going to run a server, the best hands down, as far as Linux goes, is probably Debian (no flames please) because of its package management, and 4000+ precompiled packages available in the base set. Debian is also famous for being really stable, although the really new desktop apps require updated libs - hence the reason I say its good for servers where none of those are run - as Debian is late in releasing a new set. Best Regards, T.J. From tanner at real-time.com Tue Apr 9 23:17:31 2002 From: tanner at real-time.com (Bob Tanner) Date: Mon Jan 17 14:29:34 2005 Subject: [TCLUG-DEVEL] Eclipse? Message-ID: <20020409231731.B31381@real-time.com> Anyone using Eclipse? Care to comment on how it works? -- Minneapolis St. Paul Twin Cities MN | Phone : (952)943-8700 http://www.mn-linux.org Minnesota Linux | Fax : (952)943-8500 Key fingerprint = 6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9 From jpschewe at mtu.net Thu Apr 11 13:39:15 2002 From: jpschewe at mtu.net (Jon Schewe) Date: Mon Jan 17 14:29:35 2005 Subject: [TCLUG-DEVEL] Preprocessor for Java? Message-ID: <20020411143915.A1950@mtu.net> Anyone found a nice preprocessor for Java? Particularly one that executes Java code? That or retrofitted a JSP parser for parse files? I've got some Java code that's a template for a whole bunch of files and I can do most all of it with ant and filter tokens, but I've got a bit that needs a conditional, something like this: if(@TYPE@ instance Foo) { //do Foo code } else if(Integer.TYPE.isAssignableFrom(@TYPE@) { // do something else primitive here } And I can't just output it in the code and check at runtime because otherwise the code is uncompilable. -- Jon Schewe | http://mtu.net/~jpschewe For I am convinced that neither death nor life, neither angels nor demons, neither the present nor the future, nor any powers, neither height nor depth, nor anything else in all creation, will be able to separate us from the love of God that is in Christ Jesus our Lord. - Romans 8:38-39 From tanner at real-time.com Sat Apr 27 03:11:11 2002 From: tanner at real-time.com (Bob Tanner) Date: Mon Jan 17 14:29:35 2005 Subject: [TCLUG-DEVEL] RIP Enhydra, JBoss? Message-ID: <20020427031111.N30093@real-time.com> Lutris pulled the plug on Enhydra :-( and Enhydra.org (the community). So, it's now abandon-ware. The guys at webobjects picked it up, but my experience has been once a company burns the open source community, the community looks for another solution (long story here, about Lutris and their EPL license). Anyway the Webobject poeple said with the addition of Enhydra to Jonas they could be a JBoss killer. So, I went and looked at JBoss. From what I can gather JBoss is an open source attempt at a J2EE platform. Anyone used JBoss under Linux? Care to comment? -- Minneapolis St. Paul Twin Cities MN | Phone : (952)943-8700 http://www.mn-linux.org Minnesota Linux | Fax : (952)943-8500 Key fingerprint = 6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9 From dieman at ringworld.org Sat Apr 27 10:25:53 2002 From: dieman at ringworld.org (Scott Dier) Date: Mon Jan 17 14:29:35 2005 Subject: [TCLUG-DEVEL] Re: RIP Enhydra, JBoss? In-Reply-To: <20020427031111.N30093@real-time.com> References: <20020427031111.N30093@real-time.com> Message-ID: <20020427152553.GC4002@ringworld.org> > Anyone used JBoss under Linux? One of the debian maintainers worked on a jboss package, i think. dono if he finished it. he mentioned upstream as pretty damn annoyingly unforgiving and not willing to incorprate sane changes. But, this is secondhand. -- Scott Dier http://www.ringworld.org/