libgdx/libgdx — pull request #2121 by rinold (2014-07-16 08:45:26+00:00)
Title: Adding custom timing possibility for MessageDispatcher

Previous implementation used real-timing and pausing was not possible. E.g. if I post delayed message that should be dispatched in 3 sec and then pause my game for 3 or more secs, this message will be dispatched on next #dispatchDelayedMessages() immediately however in game 0 time have passed (cause of pause).

Current implementation allows you to set the custom TimeProvider (e.g. your game level timing) that might support such things like pause/resume or slow motion timing. By default the RealTimeProvider is used implementing previous getCurrentTime to support backward-compatibility.

The other solution is to use something like standard #update(float delta) to accumulate current time, but this will be breaking implementation, so I used current approach.