有没有一种方法可以获得现在的' (至少)朱莉娅的毫秒级精度?

时间:2015-09-05 00:06:51

标签: time julia

通常,要知道在代码中发生了什么,您需要高精度的时间来分析您的应用或其他原因。 Apparently, now()没有提供此功能,但还有另一种合理简单的方式来获取此功能。到毫秒精度?

1 个答案:

答案 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