date.microsecond() 函数
date.microsecond() 返回指定时间的微秒。
结果范围 从 [0-999999]。
函数类型签名
(t: A) => int where A: Timeable
有关更多信息,请参见 Function type signatures。
参数
t
(必需) 操作所需的时间。
使用绝对时间、相对持续时间或整数。持续时间相对于 now()。
示例
返回时间值的微秒
import "date"
date.microsecond(t: 2020-02-11T12:21:03.29353494Z)// Returns 293534
返回相对持续时间的微秒
import "date"
option now = () => 2020-02-11T12:21:03.29353494Z
date.microsecond(t: -1890us)// Returns 322661
返回当前微秒单位
import "date"
date.microsecond(t: now())