Python - 没有来自timeit的结果

Bar*_*zyk 0 python timeit

我在test.py中编写了这个简单的代码(在python中).我尝试运行timeit,我没有任何错误,但我没有得到任何有关运行时间的信息.你能帮助我吗 ?

import timeit

def functionsWhile():
    "Desc about function"
    lic = 0
    n = 30000
    while lic<= n:
            lic += 1
    #print "test"
    return lic

t = timeit.Timer("functionsWhile()", "from __main__ import functionsWhile")

try:
    t.repeat(3, 2)
except:
    t.print_exc()
Run Code Online (Sandbox Code Playgroud)

我期待一个结果如(例子):

$>python test.py
[0.006793975830078125, 0.006793975830078125, 0.006793975830078125]
$>
Run Code Online (Sandbox Code Playgroud)

但我只有:

$>python test.py
$>
Run Code Online (Sandbox Code Playgroud)

我没有timeit的结果.我使用python 2.7和linux.

XOR*_*ist 6

尝试print结果t.repeat.