Skip to content

This project is a timewheel experiment implemented with ts.

License

Notifications You must be signed in to change notification settings

Prince-Hervoet/NodeTimeWheel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeTimeWheel

About a timewheel with ts.

This project is a timewheel experiment implemented with ts.If you have any question,you can challenge me.

  const w = new TimeWheel();
  w.setCellCount(5).setGranularity(3000).setMaxTaskSize(1000);
  w.start();

  const test: TimeTask = {
    callback: (data: any) => {
      console.log("我被执行了");
      return {};
    },
  };
  const j = w.add(test, 9812);
  console.log(j);

About

This project is a timewheel experiment implemented with ts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published