Artifact
62d29f960b40efec4696d138d8f4062f5b08a35f:
Attachment "testInterpLimits.tcl" to
ticket [3027822fff]
added by
kjnash
2010-07-10 22:55:49.
proc newSecondsLimit {iName} {
set elapsed [expr {([clock milliseconds] - $::t0)/1000.0}]
puts "NewSecondsLimit $iName $elapsed"
after 200 set ::ok 1
vwait ::ok
set newLimit [expr {[clock seconds] + $::secsMore}]
interp limit $iName time -seconds $newLimit -command [list newSecondsLimit $iName]
return
}
set ::t0 [clock milliseconds]
set ::secsMore 2
set int1 [interp create]
newSecondsLimit $int1
interp eval $int1 {
for {set nloop 0} {$nloop < 10000000} {incr nloop} {
set result [expr {cos($nloop) * sin($nloop)}]
}
}