RE: time references

2002-10-18 Thread Beau E. Cox
Hi - Check out Time::HiRes - has alarms, high res. Works fine on *nix boxes, but alarms don't work on Win32 Aloha => Beau. -Original Message- From: Greg Oliver [mailto:greg@;algx.net] Sent: Thursday, October 17, 2002 2:53 PM To: [EMAIL PROTECTED] Subject: time references I am writing

Re: time references

2002-10-18 Thread James Edward Gray II
How about: while (1) { my $start = time; # do what you need to do... my $end = 5 - (time - $start); sleep $end if $end > 0; } James On Thursday, October 17, 2002, at 07:52 PM, Greg Oliver wrote: I am writing a program that will do a certain function every 5 seconds. Currently, I am test

Re: time references

2002-10-18 Thread Greg Oliver
Beautiful! Cuts the CPU from 100% to nil for that second that was chewing the time - I would have never thought of it though. Pretty new to programming and don't have the full mindset yet. Thanks, Greg On Thu, 17 Oct 2002 20:13:57 -0500 James Edward Gray II <[EMAIL PROTECTED]> wrote: > How