-
Notifications
You must be signed in to change notification settings - Fork 266
Conversation
def earliestTimeOf(batch: BatchID) = new Date(Long.MinValue) | ||
override def toInterval(b: BatchID): Interval[Date] = | ||
def batchOf(t: Timestamp) = currentBatch | ||
def earliestTimeOf(batch: BatchID) = Timestamp(Long.MinValue) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add Timestamp.Min as a val in object Timestamp for this one.
after: Batcher) extends Batcher { | ||
|
||
val batchAtBound: BatchID = before.batchOf(new Date(beforeBound.upper.getTime - 1L)) + 1L | ||
val batchAtBound: BatchID = before.batchOf(Timestamp(beforeBound.upper.milliSinceEpoch - 1L)) + 1L |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some .prev on the Timestamp.
// Make sure we cover at least an hour in the usual case by multiplying by ms per hour | ||
val int = Interval.leftClosedRightOpen(d, new Date(d.getTime + (60L * 60L * 1000L * sl.get))) | ||
val int = Interval.leftClosedRightOpen(d, Timestamp(d.milliSinceEpoch + (60L * 60L * 1000L * sl.get))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a def incrementMillis(millis: Long): Timestamp
to Timestamp? (similar incrementSeconds?)
Changing to keep the on-wire just be a long, but off wire will be Timestamp |
object Timestamp { | ||
val Max = Timestamp(Long.MaxValue) | ||
val Min = Timestamp(Long.MinValue) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def now: Timestamp = Timestamp(System.currentTimeMillis)
wouldn't that clean things up a bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, adding.
Feature/remove java util date
HyperLogLogSeries
No description provided.