Skip to content

Instantly share code, notes, and snippets.

@jakubjanecek
Created February 10, 2013 13:34
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 jakubjanecek/4749599 to your computer and use it in GitHub Desktop.
Save jakubjanecek/4749599 to your computer and use it in GitHub Desktop.
ev match {
case Event(id, "event2", when, device) => println("'event2' from device " + device)
case Event(id, name, when, device) if when > System.currentTimeMillis() - 10000 => println("fresh event")
case _ => // ignore
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment