Skip to content

Instantly share code, notes, and snippets.

@jamie-allen
Last active December 11, 2015 06:48
Show Gist options
  • Save jamie-allen/4561541 to your computer and use it in GitHub Desktop.
Save jamie-allen/4561541 to your computer and use it in GitHub Desktop.
Async {
Logger.debug(s"Start $duration second wait")
Akka.system.scheduler.scheduleOnce(duration seconds){
val blocker = Future { duration }
blocker map { duration =>
Logger.debug(s"Finished $duration second wait")
Ok(duration.toString)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment