move code to src/test

* so that it compiles and tests pass
* fix some additional snip references in getting started
This commit is contained in:
Patrik Nordwall 2017-05-11 15:11:25 +02:00
parent 413df8e0f4
commit 59f53e1a22
289 changed files with 45 additions and 45 deletions

View file

@ -0,0 +1,26 @@
/**
* Copyright (C) 2013-2017 Lightbend Inc. <http://www.lightbend.com>
*/
package docs.duration
import language.postfixOps
object Scala {
//#dsl
import scala.concurrent.duration._
val fivesec = 5.seconds
val threemillis = 3.millis
val diff = fivesec - threemillis
assert(diff < fivesec)
val fourmillis = threemillis * 4 / 3 // you cannot write it the other way around
val n = threemillis / (1 millisecond)
//#dsl
//#deadline
val deadline = 10.seconds.fromNow
// do something
val rest = deadline.timeLeft
//#deadline
}