%%time 在 Jupyter 笔记本中的 Windows 上不返回 CPU 时间

Era*_*ran 7 ipython ipython-magic jupyter-notebook

%%time在 Jupyter-notebook 中使用来测量我的 Python 代码的运行时间。问题是它只Wall timeWindows上打印,但在Ubuntu上运行良好。

是否也可以CPU timeWindows上获取?

我使用的是 Windows 10,Python 3.6 Anaconda 版本。

bow*_*han 0

在windows下是不可能使用的,官方文档如下

请注意,在 Win32 下,系统时间始终报告为 0,因为无法测量它。

参考