timingTools.js 522 B

12345678910111213141516171819
  1. import { IsWindowObjectExist } from "./domManagement.js";
  2. /**
  3. * Class used to provide helper for timing
  4. */
  5. export class TimingTools {
  6. /**
  7. * Polyfill for setImmediate
  8. * @param action defines the action to execute after the current execution block
  9. */
  10. static SetImmediate(action) {
  11. if (IsWindowObjectExist() && window.setImmediate) {
  12. window.setImmediate(action);
  13. }
  14. else {
  15. setTimeout(action, 1);
  16. }
  17. }
  18. }
  19. //# sourceMappingURL=timingTools.js.map