I am trying to send actor a postponed message. Thus I use the Scheduler
, getting a code example from http://doc.akka.io/docs/akka/2.1.0/scala/scheduler.html.
[error] /home/zeus/terra/src/main/scala/hw.scala:55: value milliseconds is not a member of Int
[error] 50 milliseconds,
[error] ^
[error] one error found
[error] (compile:compile) Compilation failed
[error] Total time: 3 s, completed Aug 11, 2014 4:07:48 PM
Surprisingly, this error occured... Deleting the milliseconds
from my code, another error appeared:
[error] /home/vador/death_star/src/main/scala/hw.scala:55: type mismatch;
[error] found : Int(50)
[error] required: scala.concurrent.duration.FiniteDuration
[error] 50,
[error] ^
[error] one error found
[error] (compile:compile) Compilation failed
[error] Total time: 3 s, completed Aug 11, 2014 4:12:32 PM
I do not see the point here.
Based on the comments, @Ende Neu was probably on the right track.
import scala.concurrent._
This does not give you the duration implicits. You need to also import those:
import scala.concurrent.duration._
The actual implicits you want are on scala.concurrent.duration.DurationInt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With