REQ-3345: 同步消息
This commit is contained in:
parent
0572e43384
commit
5d52e9639d
@ -20,7 +20,7 @@ public class Timeline {
|
||||
public Timeline(Long beginMs, Long endMs) {
|
||||
BizAssertions.assertTrue(beginMs <= endMs, "beginMs must be less than or equal to endMs");
|
||||
nodes = new LinkedList<>();
|
||||
prepend(split(beginMs, endMs, splitCount));
|
||||
prepend(split(beginMs, endMs));
|
||||
}
|
||||
|
||||
private void prepend(List<TimeNode> nodes) {
|
||||
@ -34,7 +34,7 @@ public class Timeline {
|
||||
BizAssertions.assertTrue(node.isSplittable(), "node is not splittable");
|
||||
nodes.removeFirst();
|
||||
splitCount *= 2;
|
||||
prepend(split(node.getBeginMs(), node.getEndMs(), splitCount));
|
||||
prepend(split(node.getBeginMs(), node.getEndMs()));
|
||||
return peek();
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ public class Timeline {
|
||||
return nodes.peek();
|
||||
}
|
||||
|
||||
private List<TimeNode> split(Long beginMs, Long endMs, int splitCount) {
|
||||
private List<TimeNode> split(Long beginMs, Long endMs) {
|
||||
BizAssertions.assertTrue(beginMs <= endMs, "beginMs must be less than or equal to endMs");
|
||||
List<TimeNode> nodes = new ArrayList<>();
|
||||
long totalDuration = endMs - beginMs;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user