[Tkinter-discuss] How fast is my computer?

Tim Jones timj at tolisgroup.com
Tue Apr 3 19:35:28 CEST 2007


On Apr 3, 2007, at 8:23 AM, Bob Greschke wrote:

> Does anyone have ideas on a good, little, short, quick routine that  
> I can
> slip into my program that will run before an operation starts that  
> will give
> me some kind of gauge as to the speed of the system the application is
> running on so I can set my "%X" value (i.e. if Count%X == 0: say  
> something)
> appropriate for the system speed?  (Like I'll determine the best  
> value for X
> on the fastest machine and use this routine to scale things down from
> there.)

How about a timer loop that reacts based on the number of seconds  
passed.  This way, you print whatever the number of processed  
"things" is every 3 seconds (for example).  This way, it doesn't  
matter how fast the system is - you get an update for the user every  
'n' seconds.

Tim
--
Tim Jones
tjmac at tolisgroup.com





More information about the Tkinter-discuss mailing list