Skip to content

Instantly share code, notes, and snippets.

@spullara
Created March 13, 2010 22:29
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 spullara/331602 to your computer and use it in GitHub Desktop.
Save spullara/331602 to your computer and use it in GitHub Desktop.
private static long REFERENCE = System.nanoTime();
...
SimpleDateFormat dateKey = new SimpleDateFormat("yyyyMMddHHmmss");
String delta = String.valueOf(System.nanoTime() - REFERENCE);
byte[] timestamp = $(dateKey.format(date) + delta.substring(delta.length() - 9));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment