More progress. More work.
[tripe-android] / util.scala
index ea776e7..8ede691 100644 (file)
@@ -36,6 +36,7 @@ import java.nio.{ByteBuffer, CharBuffer};
 import java.nio.channels.{SelectionKey, Selector};
 import java.nio.channels.spi.{AbstractSelector, AbstractSelectableChannel};
 import java.nio.charset.Charset;
+import java.text.SimpleDateFormat;
 import java.util.{Set => JSet};
 import java.util.concurrent.locks.{Lock, ReentrantLock};
 
@@ -561,7 +562,9 @@ def oxford(conj: String, things: Seq[String]): String = things match {
     sb.result
 }
 
-def formatTime(t: Int): String =
+val datefmt = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");
+
+def formatDuration(t: Int): String =
   if (t < -1) "???"
   else {
     val (s, t1) = (t%60, t/60);