When delay is <= 0 use remaining time, not just duration.

http://www.esotericsoftware.com/forum/viewtopic.php?f=7&t=1447
Better delay adjustment.
Better C# events.
Merge remote-tracking branch 'upstream/master'