我只想尝试一段代码.伪代码看起来像:
start = get_ticks() do_long_code() print "It took " + (get_ticks() - start) + " seconds."
这看起来如何用Python?
更具体地说,我如何得到午夜以来的滴答数(或者Python组织那个时间)?
python timer
python ×1
timer ×1