Skip to content

Commit

Permalink
squash: Remove unnecessary type, inherit the clock in clone().
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrozev committed Jun 6, 2024
1 parent b56b14f commit 28251c4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class EventTimeline(
private val clock: Clock = Clock.systemUTC()
) : Iterable<Pair<String, Duration>> {

private val timeline: MutableList<Pair<String, Duration>> = Collections.synchronizedList(timelineArg)
private val timeline = Collections.synchronizedList(timelineArg)

/**
* The [referenceTime] refers to the first timestamp we have
Expand All @@ -58,7 +58,7 @@ class EventTimeline(
}

fun clone(): EventTimeline {
val clone = EventTimeline(timeline.toMutableList())
val clone = EventTimeline(timeline.toMutableList(), clock)
clone.referenceTime = referenceTime
return clone
}
Expand Down

0 comments on commit 28251c4

Please sign in to comment.