Show loader and run methods at specific time

Hi guys,

I wanna build a loader circle what goes from 1 to 100% and in the meantime to run some methods.

The scenario is:

  • load the page and start counting.
  • When the counter is at 50% pause counting and run the first method and when I have the result to start counting from where I was left.
  • count until 90% and run the second method.

I was trying something with Meteor.setInterval on onCreated but I’m not sure if it’s the right method to do this.

Can someone give me some ideas about how to approach this?