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)}]
    }
}
