Exitimer

Exitimer is a tool we use to cleanly time and exit loops throughout our programs.

A by-reference timing tool

Exitimer provides a by-reference method to time and exit loops. We rely on it to deliver the following benefits:

  • Combines timing a loop and checking for exit
  • Allows scoped shutdown - all or part of a program
  • Can be distributed throughout the program by-reference
  • Provides shutdown for while, for, and event loops
  • Makes it easy to close asynchronous loops
  • Has clearly defined function in line with the Single Responsibility principle

Compared to other solutions

We've found Exitimer superior to these other methods of timing/exiting. Here are some comparisons:

  • Exit Global Variable Exitimer gives scoped control over quitting - you can have multiple instances for layered exit.
  • Local Variables Exitimer quits loops without potential for race conditions. If Quit.vi is called, every Check.vi will signal exit from that point on.
  • Queues/Channel Wires/Notifiers Exitimer generates a quit event when Quit.vi is called, making it really easy to use in UI loops where notifiers and queues fail.
  • Functional Global/Action Engine Exitimer is optimized to ensure that checks are lightning fast, making it useful in fast loops and real-time applications
Exitimer palette

Using Exitimer

Exitimer is composed of five simple methods:

Exitimer new method
Create if null method
Check method
Register for exitimer method
Exit method