StandardInstantTimestamp

使用 Kotlin 标准库中的 Instant 作为时间戳基准的 Timestamp 实现。

Author

ForteScarlet

Since

5.0

Constructors

Link copied to clipboard
constructor(instant: Instant)

Properties

Link copied to clipboard
open override val milliseconds: Long

毫秒级时间戳结果。

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String

Inherited functions

Link copied to clipboard
open operator override fun compareTo(other: Timestamp): Int

默认情况下,Timestamp 通过 milliseconds 进行顺序比较。

Link copied to clipboard
open infix fun timeAs(unit: TimeUnit): Long

将时间戳时间转化为指定单位的结果。