diff options
author | Guido van Rossum <guido@python.org> | 2000-06-29 19:35:29 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-06-29 19:35:29 (GMT) |
commit | 3e06ab1d447442a56af739a906546d8d1998dfdc (patch) | |
tree | 23145a16354b8b2e59932767c6dc9a5b56bb12cf /Lib/dos-8x3/test_tim.py | |
parent | 45cd9de2bb2faa96bb18eb11d20261d7d1b8c20e (diff) | |
download | cpython-3e06ab1d447442a56af739a906546d8d1998dfdc.zip cpython-3e06ab1d447442a56af739a906546d8d1998dfdc.tar.gz cpython-3e06ab1d447442a56af739a906546d8d1998dfdc.tar.bz2 |
The usual :)
Diffstat (limited to 'Lib/dos-8x3/test_tim.py')
-rw-r--r-- | Lib/dos-8x3/test_tim.py | 54 |
1 files changed, 18 insertions, 36 deletions
diff --git a/Lib/dos-8x3/test_tim.py b/Lib/dos-8x3/test_tim.py index 03d081e..5dbc895 100644 --- a/Lib/dos-8x3/test_tim.py +++ b/Lib/dos-8x3/test_tim.py @@ -1,39 +1,21 @@ -import time +from test_support import verbose +import timing -time.altzone -time.clock() -t = time.time() -time.asctime(time.gmtime(t)) -if time.ctime(t) <> time.asctime(time.localtime(t)): - print 'time.ctime(t) <> time.asctime(time.localtime(t))' - -time.daylight -if long(time.mktime(time.localtime(t))) <> long(t): - print 'time.mktime(time.localtime(t)) <> t' - -time.sleep(1.2) -tt = time.gmtime(t) -for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', - 'j', 'm', 'M', 'p', 'S', - 'U', 'w', 'W', 'x', 'X', 'y', 'Y', 'Z', '%'): - format = ' %' + directive - try: - time.strftime(format, tt) - except ValueError: - print 'conversion specifier:', format, ' failed.' - -time.timezone -time.tzname - -# expected errors -try: - time.asctime(0) -except TypeError: +r = range(100000) +if verbose: + print 'starting...' +timing.start() +for i in r: pass +timing.finish() +if verbose: + print 'finished' -try: - time.mktime((999999, 999999, 999999, 999999, - 999999, 999999, 999999, 999999, - 999999)) -except OverflowError: - pass +secs = timing.seconds() +milli = timing.milli() +micro = timing.micro() + +if verbose: + print 'seconds:', secs + print 'milli :', milli + print 'micro :', micro |