Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Progress Meter / Clock Timer

Status
Not open for further replies.

cptk

Technical User
Mar 18, 2003
305
US
I want to display the elapsed time of a user-invoked event.
But in implementing this feature I noticed that the feature itself adds a tremendeous amount of time to the oveall time the event runs.
For example, if I just display the start time and ending time for scanning an open file of some 60,000 lines, the elasped time is approx. 3 seconds.
BUT, if I call a subroutine within the while loop to update a label widget, it adds nearly 2 minutes to the overall elapsed time!
Example of subroutine:
> .label configure -text "[expr [clock seconds] - $st]
> update

where $st arg is passed in from the calling proc; set ST [clock seconds]

Will all progress-type functions add this much overhead??
Note: adding idletasks to the update cmd saves approx. 30 seconds in this example.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top