import scala.actors._ import Actor._ class TrivialActor(val id: String) extends Actor { private val birth = System.currentTimeMillis() start def act = { for (i <- 1 to 7) { println(id+"(" + i + "): " + (System.currentTimeMillis() - birth)/1000.) Thread.sleep((1000*scala.math.random) toLong) } } } object Actors extends Application { val a1 = new TrivialActor("Dora") val a2 = new TrivialActor("Hugo") val a3 = new TrivialActor("Theo") }