From 8095bd3288428323935d46288ae5d6df575c258c Mon Sep 17 00:00:00 2001 From: xuwei-k <6b656e6a69@gmail.com> Date: Sat, 10 Feb 2018 14:10:55 +0900 Subject: [PATCH] fix pollInterval example - https://github.com/sbt/sbt/blob/v1.1.1/main/src/main/scala/sbt/Defaults.scala#L251 - https://github.com/sbt/sbt/blob/v1.1.1/main/src/main/scala/sbt/Keys.scala#L143 - https://github.com/sbt/sbt/commit/0daca42c29188a511fd85bf4826dc05dac258b4b --- src/reference/04-Howto/12-Howto-Triggered.md | 4 +++- src/reference/04-Howto/90-Examples/01-Basic-Def-Examples.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/reference/04-Howto/12-Howto-Triggered.md b/src/reference/04-Howto/12-Howto-Triggered.md index 3648805c0..7dac51863 100644 --- a/src/reference/04-Howto/12-Howto-Triggered.md +++ b/src/reference/04-Howto/12-Howto-Triggered.md @@ -73,5 +73,7 @@ watchSources += baseDirectory.value / "demo" / "examples.txt" milliseconds. The default value is `500 ms`. To change it to `1 s`, ```scala -pollInterval := 1000 // in ms +import scala.concurrent.duration._ + +pollInterval := 1.second ``` diff --git a/src/reference/04-Howto/90-Examples/01-Basic-Def-Examples.md b/src/reference/04-Howto/90-Examples/01-Basic-Def-Examples.md index 2172f4bc3..09d04a232 100644 --- a/src/reference/04-Howto/90-Examples/01-Basic-Def-Examples.md +++ b/src/reference/04-Howto/90-Examples/01-Basic-Def-Examples.md @@ -13,6 +13,8 @@ Listed here are some examples of settings (each setting is independent). See [.sbt build definition][Basic-Def] for details. ```scala +import scala.concurrent.duration._ + // factor out common settings into a sequence lazy val commonSettings = Seq( organization := "org.myproject", @@ -52,7 +54,7 @@ lazy val root = (project in file(".")) maxErrors := 20, // increase the time between polling for file changes when using continuous execution - pollInterval := 1000, + pollInterval := 1.second, // append several options to the list of options passed to the Java compiler javacOptions ++= Seq("-source", "1.5", "-target", "1.5"),