summaryrefslogtreecommitdiffstats
path: root/tests/io.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-05-22 12:32:35 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-05-22 12:32:35 (GMT)
commit37fe70162445331d0bd79172835efe7e4e8b7ed4 (patch)
treeb7a8109c89a37c837bad87da175c2e618fb4d15b /tests/io.test
parentd9796c9379024e58c82a99180f04f5e69c4d6393 (diff)
downloadtcl-37fe70162445331d0bd79172835efe7e4e8b7ed4.zip
tcl-37fe70162445331d0bd79172835efe7e4e8b7ed4.tar.gz
tcl-37fe70162445331d0bd79172835efe7e4e8b7ed4.tar.bz2
Increase the timer resolution of test io-29.33b so the timing sensitivity
of the test is reduced and failures on slow runs are avoided.
Diffstat (limited to 'tests/io.test')
-rw-r--r--tests/io.test6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/io.test b/tests/io.test
index e6cea16..386179e 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -2748,13 +2748,13 @@ test io-29.33b {TIP#398, no implicit flush of nonblocking on exit} {exec} {
set f [open $path(script2) w]
puts $f {after 2000}
close $f
- set t1 [clock seconds]
+ set t1 [clock milliseconds]
set ff [open "|[list [interpreter] $path(script2)]" w]
catch {unset ::env(TCL_FLUSH_NONBLOCKING_ON_EXIT)}
exec [interpreter] $path(script) >@ $ff
- set t2 [clock seconds]
+ set t2 [clock milliseconds]
close $ff
- expr {($t2-$t1)/2}
+ expr {($t2-$t1)/2000 ? $t2-$t1 : 0}
} 0
test io-29.34 {Tcl_Close, async flush on close, using sockets} {socket tempNotMac fileevent} {
variable c 0