Efficient way of using clock component?

Suppose I have to perform 3 tasks :
Task A: Which operates every 5 Seconds
Task B: Which operates every 12 second
Task C: Which operates every 21 second and so on

So what will be more efficient ,

  1. Using 3 different clock component of time interval 5, 12 & 21 seconds
  2. Using only 1 clock component on 1-sec interval which uses modulus to perform the tasks
    eg :
    on clock.timer
    n = n + 1
    if n%5=0 : then A
    else if n%12=0 then B etc.

Which of the two methods will be more efficient and less laggy. Assume that I am using 12-15 clock components.

I thinks Instead of asking, you can try it by testing yourself, as it’s easy to do it.

Both works but I need the more efficient way.
I cannot detect the variations of milliseconds.

What are you trying to achieve and what exactly is the purpose / goal?

What does “efficient” mean precisely? Everyone uses this word without apparently knowing what it exactly means.

A little digression :wink:: The term has its roots in Welfare Theory (and the economist → Vilfredo Pareto):

What does that mean? And again what is the purpose / goal (of your question / app)?

So first read this (specially → point 2):

1 Like

Sorry but I was clear enough.

Even though I had given even all necessary information in first post , however what more I can tell is. In a game I am using many clock components to call certain actions after specific time interval.
Do using multiple(15-20) clock components hinder performance and speed of app ?

Thanks for teching me English but for now I am more interested in getting solution of my question instead of reading about origin and history of “efficiency”. Everyone use and understand the word in this way. No offence

It has become your ninja technique.:joy: I even gave example to explain my question. What more info do you need :unamused:

Yes, true.


In which way?

I mentioned → point 2:

What is the goal / purpose of your app?

I can give you list of all topics Kodular community where word “efficient way” is used but that will go offtopic what this post has already become. Please just type efficient in Kodular search bar and read their usage in sentence in first 5 - 6 post in search result.

You are not wrong but I am not a English teacher sorry. I am not even native English speaker so please forgive my english mistakes.

I am using it in a game (as I mentioned it in detail in the above post)
And not only for game the answer should be applicable to all types of apps.

I only ask that problems be formulated clearly and unambiguously. And this in simple terms that are understandable for everyone (including me). So everyone is helped.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.