using System.Threading.Tasks;

namespace Plane
{
    public static class TaskUtils
    {
        public static readonly Task CompletedTask =
#if NET45
            Task.FromResult(true);
#else
            Task.CompletedTask;
#endif

        public static Task Delay(int millisecondsDelay)
        {
#if NET4
            return TaskEx.Delay(millisecondsDelay);
#else
            return Task.Delay(millisecondsDelay);
#endif
        }
    }
}
