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)
commit18e9a6f3e4ca3f54e389e421704129e2cb8d7fd6 (patch)
treeb7a8109c89a37c837bad87da175c2e618fb4d15b /tests/io.test
parent56312304b98fa9311dc467ce59da8b0e9e3dae4c (diff)
downloadtcl-18e9a6f3e4ca3f54e389e421704129e2cb8d7fd6.zip
tcl-18e9a6f3e4ca3f54e389e421704129e2cb8d7fd6.tar.gz
tcl-18e9a6f3e4ca3f54e389e421704129e2cb8d7fd6.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