From 8c3180573aedb8cd96c382c1228afbdab448c161 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sun, 10 Aug 2014 19:46:00 -0700 Subject: [PATCH] pass milliseconds, not seconds (and be careful to cast early) --- .../XWords4/src/org/eehouse/android/xw4/DBUtils.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java index cef16bbe8..8114bdc07 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/DBUtils.java @@ -288,9 +288,12 @@ public class DBUtils { values.put( DBHelper.DICTLANG, summary.dictLang ); values.put( DBHelper.GAMEID, summary.gameID ); values.put( DBHelper.GAME_OVER, summary.gameOver? 1 : 0 ); + // DbgUtils.logf("saveSummary(%d): lastMoveTime: %s", rowid, + // DbgUtils.secondsToDateStr(summary.lastMoveTime) ); values.put( DBHelper.LASTMOVE, summary.lastMoveTime ); - long nextNag = summary.nextTurnIsLocal() - ? NagTurnReceiver.figureNextNag( summary.lastMoveTime ) : 0; + long nextNag = summary.nextTurnIsLocal() ? + NagTurnReceiver.figureNextNag( 1000*(long)summary.lastMoveTime ) + : 0; DbgUtils.logf( "setting nag time for %d: %d", rowid, nextNag ); values.put( DBHelper.NEXTNAG, nextNag ); @@ -1038,7 +1041,7 @@ public class DBUtils { cursor.close(); db.close(); } - DbgUtils.logf( "getNextNag()=>%d", result ); + DbgUtils.logf( "getNextNag()=>%s", DbgUtils.millisToDateStr(result) ); return result; }