diff options
Diffstat (limited to 'Code/Tcl')
-rw-r--r-- | Code/Tcl/func_abc.tcl | 20 | ||||
-rw-r--r-- | Code/Tcl/func_slow.tcl | 29 |
2 files changed, 49 insertions, 0 deletions
diff --git a/Code/Tcl/func_abc.tcl b/Code/Tcl/func_abc.tcl new file mode 100644 index 000000000000..c84acb074882 --- /dev/null +++ b/Code/Tcl/func_abc.tcl @@ -0,0 +1,20 @@ +#!./tclsh + +proc func_c {} { + puts "Function C" + after 1000 +} + +proc func_b {} { + puts "Function B" + after 1000 + func_c +} + +proc func_a {} { + puts "Function A" + after 1000 + func_b +} + +func_a diff --git a/Code/Tcl/func_slow.tcl b/Code/Tcl/func_slow.tcl new file mode 100644 index 000000000000..d4fc59894680 --- /dev/null +++ b/Code/Tcl/func_slow.tcl @@ -0,0 +1,29 @@ +#!./tclsh + +proc func_c {} { + puts "Function C" + set i 0 + while {$i < 300000} { + set i [expr $i + 1] + } +} + +proc func_b {} { + puts "Function B" + set i 0 + while {$i < 200000} { + set i [expr $i + 1] + } + func_c +} + +proc func_a {} { + puts "Function A" + set i 0 + while {$i < 100000} { + set i [expr $i + 1] + } + func_b +} + +func_a |