summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2004-07-10 20:38:43 (GMT)
committerKevin B Kenny <kennykb@acm.org>2004-07-10 20:38:43 (GMT)
commit7609e2c3a04295aac611eb1a860eeb060bbfc4fd (patch)
treec796ed532919c3a950dcf8120ea715ed84f50d97 /tests
parent5f7664fb28c03bce899572a39a9e3b343c223f3a (diff)
downloadtcl-7609e2c3a04295aac611eb1a860eeb060bbfc4fd.zip
tcl-7609e2c3a04295aac611eb1a860eeb060bbfc4fd.tar.gz
tcl-7609e2c3a04295aac611eb1a860eeb060bbfc4fd.tar.bz2
clock.test: Changed clock-2.11 so that it isn't an infinite loop when
run on a slow virtual machine.
Diffstat (limited to 'tests')
-rw-r--r--tests/clock.test13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/clock.test b/tests/clock.test
index 56861ce..9f6921e 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: clock.test,v 1.31 2004/06/23 15:36:55 dkf Exp $
+# RCS: @(#) $Id: clock.test,v 1.32 2004/07/10 20:38:44 kennykb Exp $
set env(LC_TIME) POSIX
@@ -89,13 +89,20 @@ test clock-2.10 {clock clicks test, micros align with seconds} {
test clock-2.11 {clock clicks test, millis align with micros} {
set t1 [clock clicks -millis]
- while { 1 } {
+ set i 0
+ while { $i < 1000 } {
set t2 [clock clicks -micros]
set t3 [clock clicks -millis]
if { $t3 == $t1 } break
set t1 $t3
+ incr i
}
- expr { $t2 / 1000 == $t3 }
+ if { $i >= 1000 } {
+ set result {can't test millis/micros alignment, loop running too slow}
+ } else {
+ set result [expr { $t2 / 1000 == $t3 }]
+ }
+ set result
} {1}
test clock-2.12 {clock clicks test, wrong num args} {