Avast, thar be bugs here too.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5936 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2009-08-30 00:37:08 +00:00
parent e27f0ed5e2
commit bf5d3c666f
@@ -72,7 +72,7 @@ public class CronLogic
*/
public void scheduleEvery (int hourlyPeriod, Runnable job)
{
int minOfHour = job.getClass().toString().hashCode() % 60;
int minOfHour = Math.abs(job.getClass().toString().hashCode()) % 60;
int minOfDay = 0;
synchronized (_jobs) {
while (minOfDay < 24*60) {
@@ -99,7 +99,7 @@ public class CronLogic
*/
public void scheduleAt (int hour, Runnable job)
{
int minOfHour = job.getClass().toString().hashCode() % 60;
int minOfHour = Math.abs(job.getClass().toString().hashCode()) % 60;
synchronized (_jobs) {
_jobs.put(hour * 60 + minOfHour, job);
}