JS Timers with a delay of 0 now work as documented.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3945 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
Jens Ayton 2011-01-01 13:32:50 +00:00
parent 17557402f3
commit 81ed354cd0

View File

@ -4,7 +4,7 @@ OOScriptTimer.m
Oolite
Copyright (C) 2004-2010 Giles C Williams and contributors
Copyright (C) 2004-2011 Giles C Williams and contributors
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -186,7 +186,7 @@ static OOPriorityQueue *sTimers = nil;
double scaled;
now = [UNIVERSE getTime];
if (_nextTime <= now)
if (_nextTime < now)
{
if (_interval <= 0.0) return NO; // One-shot timer which has expired