A Unix command that launches a program/process with a given priority in relation to other programs/processes. The idea is to make that program/process run slower than it usually does so as to use less CPU power and leave a more usable portion of it to other programs/processes that might be running at the same time. Now [LES] wonders if it's possible to do that with Tcl scripts in a cross-platform way. From May 18 to this day of September, [LES] still wonders if it's possible to force a Tcl application to run slower and use less CPU in a cross-platform way... [AM] (17 september 2004) Well, I just checked how this is to be done on Windows: start /low tclsh.exe myprog.tcl would put the process in the "idle" priority class (this is from the help information on ''start'' - do not ask me why there is no match between the keyword and the class name ;)) ''[RS]: "help start" tells me that there's these priority classes: low - belownormal - normal - abovenormal - high - realtime.'' So, at start-up time it is quite possible: just define a small script that will start a new Tcl shell with the correct nice value from the start ... If you want to do this dynamically, I suppose you could redefine the proc command to function as a small wrapper: proc proc {arglist body} { after $::timetowait eval $body } or something like that ... [Lars H]: Don't you rather mean rename proc tcl::original_proc tcl::original_proc proc {name arglist body} { namespace eval [uplevel 1 {namespace current}] [list ::tcl::original_proc $name $arglist "::after $::timetowait\n$body"] } or something like that? Your suggestion just causes [proc] to evaluate the bodies immediately, it doesn't define any commands! Not that I'm sure either one would do much good. Every procedure call would suddenly have an extra delay (that in itself can have a very uneven effect), but whether the time spent waiting can actually be used by other processes is very much dependent on how this waiting is implemented. In the simplistic implementation that [after] simply sits in a tight loop that polls the clock, other processes would ''not'' benefit from the proc redefinition. ---- [[Category TBD - to be determined]]