Skip to content

Instantly share code, notes, and snippets.

@kulikov
Created July 11, 2012 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kulikov/3090573 to your computer and use it in GitHub Desktop.
Save kulikov/3090573 to your computer and use it in GitHub Desktop.
val deliveryTime =
if (meta.deliveryTimeFrom.nonEmpty) {
meta.deliveryTimeFrom.get // optimistic
} else {
val currentTime = Await.result(timeService ? GetTime, timeout.duration).asInstanceOf[Long]
currentTime + (3600 * 24 * 1000) // next day
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment