code: function timeout(timeoutMS) {
          var id;
          return new Promise(
              function (c) {
                  if (timeoutMS) {
                      id = _Global.setTimeout(c, timeoutMS);
                  } else {
                      _BaseCoreUtils._setImmediate(c);
                  }
              },
              function () {
                  if (id) {
                      _Global.clearTimeout(id);
                  }
              }
          );
      }
docs: Promise is the user-creatable WinJS.Promise object.