Method not found


(Mghildiy) #1

Here, following code is provided:

public ServerServiceCall<String, Source<String, ?>> tick(int intervalMs) {
return tickMessage -> {
Duration interval = Duration.ofMillis(intervalMs);
return completedFuture(Source.tick(interval, interval, tickMessage));
};
}

But compilation errors occur. Both ofMillis() and Source.tick() methods are not found.
Is code not in sync with latest API?


(Mghildiy) #2

Issue is solved.
Duration is java.time.Duration. It seems I was wrongly making use of some other Duration class.