Created
January 14, 2012 16:19
-
-
Save KarlHerler/1611929 to your computer and use it in GitHub Desktop.
Relevant parts of a cache expiry timer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Calendar | |
import java.util.GregorianCalendar | |
val d = new GregorianCalendar(TimeZone.getTimeZone("Europe/Helsinki")) | |
d.set(Calendar.HOUR, 10) | |
val expiry = ((d.getTimeInMillis-System.currentTimeMillis)/1000L).toInt | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment