通常,要知道在代码中发生了什么,您需要高精度的时间来分析您的应用或其他原因。 Apparently, now()没有提供此功能,但还有另一种合理简单的方式来获取此功能。到毫秒精度?
答案 0 :(得分:3)
来自文档:
help?> time
time()
Get the system time in seconds since the epoch, with fairly high (typically, microsecond) resolution.
因此,您可以使用它获取当前DateTime
。
但是,如果你只是想要相对时间,例如通过分析,您可以使用tic()
和toq()
或time_ns()
获得非常高的准确度,或仅使用time
。