• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Which option is faster and more viable?

Status
Not open for further replies.
Level 11
Joined
Oct 9, 2015
Messages
721
I wanted to know which of these approach options are more faster and viable? Periodic trigger or Countdown timer trigger? Thanks in advance!
  • Trigger 1
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- DO ACTIONS --------
  • Trigger 2
    • Events
      • Time - Dummy_Timmer expires
    • Conditions
    • Actions
      • -------- DO ACTIONS --------
      • Countdown Timer - Start Dummy_Timmer as a One-shot timer that will expire in 0.03 seconds
 
Such differences do not really matter, especially in GUI. At least not about performance.
There is logical difference though, in case you play around with stop/re-starting the periodical actions.

When ever you start the timer with "0.03" timeout, it will elapse after exactly "0.03" of timeout, meaning that the trigger will run after exactly "0.03" seconds.

But using the first event, in combination with turn trigger on/off, it may have an offset in the first interal, which is between "0" and the used timeout, so in this case "0.03".
The periodic event "0.03" seconds will still "run" in background, even the trigger is turned off, so when you randomly jump in at a time, then you don't control when the next event of "Every 0.03" seconds will run.

But it doesn't really matter practicaly for such minimum timeout like "0.03".
 
Status
Not open for further replies.
Top