Network statistics program

Anthony Baxter anthony at interlink.com.au
Wed May 17 01:14:10 EDT 2000


You could use setitimer on unix - set alarms.

You could schedule the collector to go off once a minute from cron.

>>> "Greg Fortune" wrote
>     I'm currently working on a program that will run some network statistics
> for me over the span of months.  I want to send a ping every minute, collect
> the results, and then store that information in a database.  I think I can
> get everything working, but the issue of the one minute interval is killing
> me.  How do I make my program just sit there and do nothing until the system
> clock says it has been a minute?  Never before have I *tried* to make a
> program do nothing  :).
>     I consider a while loop with a pass statement or a time check, but that
> seems like it would take up processor cycles for little reason.
>     I also considered letting ping handle the interval and just use ping as
> the piped input. Although this may be the simplest solution for me at this
> time, I really want to learn how to implement delay.
> 
> Any help is greatly appreciated,
> 
> Greg Fortune
> 
> 
> -- 
> http://www.python.org/mailman/listinfo/python-list
> 

-- 
Anthony Baxter     <anthony at interlink.com.au>   
It's never too late to have a happy childhood.




More information about the Python-list mailing list