Scala to Java conversion


(Mghildiy) #1

I have a piece of code in Scala, as:

system.scheduler.scheduleOnce(200.millis) {
control ! ControlSurfaces.StickBack(1f)
}

I need to convert to java.
I have ActroRef ‘control’, and I can also create message instance for StickBack.
IDE suggests several options, but all need ExecutionContext.
How to get it?


(Patrik Nordwall) #2

system.dispatcher is an ExecutionContext