是否存在类似于以下方法的时间戳的近似比较方法? org.scalactic.TolerantNumerics
例如:
case class Event(type: String, date: java.sql.Timestamp)
test("some test case") {
val e1 = Event("save", new java.sql.Timestamp(12345))
val e2 = Event("save", new java.sql.Timestamp(12350))
// we can setup approximate value for comparison of the timestamps
e1 shouldEqual e2 // has to produce `true`
}