This changeset adds a new sleep() function and deprecates the resolve() and reject() functions in favor of the new sleep() function.
The new sleep() function does precisely what the current resolve() function does: It creates a promise that will be fulfilled in a given number of seconds. The only difference is that the sleep() function resolves with no value, whereas the resolve() function resolves with the number of seconds. The previous type was a pretty arbitrary design decision I made, the new type now matches how usleep() returns a void.
Using the name sleep() makes a lot more sense as introducing an asynchronous delay is a rather common requirement and it makes sense to mimic PHP's built-in sleep() function. On top of this, this also helps avoid any ambiguities, as the React\Promise\resolve() function does something entirely different than the React\Promise\Timer\resolve() function (same local name, only different namespace). This is also a major DX improvement, as IDE autocompletion would always suggest the wrong function import, let alone the fact that you wouldn't look for a function named "resolve" if you want to "sleep".
Similarly, the reject() function was mostly added to complement the resolve() function, but I don't see any real-world use cases for this. Implementing this on top of the sleep() function is trivial (see its implementation), so I will argue it provides very little value.
Builds on top of #49