Quantcast
Channel: Akka Libraries - Discussion Forum for Akka technologies
Viewing all articles
Browse latest Browse all 1365

How to get time left on a actor timer?

$
0
0

Hi, I couldn’t find info on this in the documentation or in another questions.

Inside an actor that implements AbstractActorWithTimers I start a timer with:

getTimers().startSingleTimer("game-lifespan", PoisonPill.getInstance(), this.lifeSpan);

lifeSpan is a FiniteDuration of 60 seconds. This timer will kill the actor ending the game associated with it.

Is there a way to find how much time is left on this timer?
When I receive a specific message from another actor, I would like to reply to it with the time left.

Thanks.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1365

Trending Articles