[virtualcommons-svn] SF.net SVN: virtualcommons:[471] csidex/trunk/src/main/java/edu/asu/commons /
Status: Beta
Brought to you by:
alllee
From: <al...@us...> - 2010-02-12 22:44:39
|
Revision: 471 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=471&view=rev Author: alllee Date: 2010-02-12 22:44:32 +0000 (Fri, 12 Feb 2010) Log Message: ----------- changing interval processing to use longs instead of ints Modified Paths: -------------- csidex/trunk/src/main/java/edu/asu/commons/experiment/SaveFileProcessor.java Modified: csidex/trunk/src/main/java/edu/asu/commons/experiment/SaveFileProcessor.java =================================================================== --- csidex/trunk/src/main/java/edu/asu/commons/experiment/SaveFileProcessor.java 2010-02-11 23:58:59 UTC (rev 470) +++ csidex/trunk/src/main/java/edu/asu/commons/experiment/SaveFileProcessor.java 2010-02-12 22:44:32 UTC (rev 471) @@ -42,9 +42,9 @@ // FIXME: not thread safe for concurrent usage when reusing the same SaveFileProcessor in multiple threads // on multiple save files. - private int secondsPerInterval; - private int currentInterval = 0; - private int intervalEnd = 0; + private long secondsPerInterval; + private long currentInterval = 0; + private long intervalEnd = 0; private String roundSaveFile; @@ -56,7 +56,7 @@ this.secondsPerInterval = secondsPerInterval; } - public boolean isIntervalElapsed(int secondsElapsed) { + public boolean isIntervalElapsed(long secondsElapsed) { intervalEnd = (currentInterval + 1) * secondsPerInterval; if (secondsElapsed >= intervalEnd) { currentInterval++; @@ -69,7 +69,7 @@ * Returns the total number of seconds that must elapse before the current interval ends (e.g., 60, 120, 180). * @return the total number of seconds that must elapse before the current interval ends */ - protected int getIntervalEnd() { + protected long getIntervalEnd() { return intervalEnd; } @@ -77,7 +77,7 @@ currentInterval = 0; } - public void setSecondsPerInterval(int secondsPerInterval) { + public void setSecondsPerInterval(long secondsPerInterval) { this.secondsPerInterval = secondsPerInterval; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |