Triggers are defined and controlled in the Triggers and Actions pane of the Setup panel. By default, this panel includes one predefined trigger, Initial Profiling Status for Threads. This trigger can be used to control profiling by itself as well as in conjunction with other triggers.
You can create a new trigger by using the Add Trigger dialog. To call the dialog, perform one of the following actions:
- Select Add Trigger from the context menu of the Setup panel.
- Select Project > Add Trigger from AQTime's main menu.
- Click Add Trigger on the Setup toolbar.
In the Add Trigger dialog, you can specify the following trigger properties and options:
- In the Name field, specify the name of the trigger to be created.
- In the Type section, choose the type of the trigger: On or Off.
- In the Pass Count field, specify how many times the trigger routines will be called before they act as triggers.
- In the Work Count field, specify how many consecutive calls will act on the trigger, before the trigger stops acting again.
- Select the Cycling check box to specify whether the pass-count-work-count cycle will be repeated after the work count + 1 is reached and the trigger is deactivated.
- Using For All Threads, specify whether the call count is taken over all threads or over each thread individually.
Once you close the dialog, the new trigger will appear in the Triggers and Actions pane, and it will be marked with an appropriate icon:
Adding Elements to Triggers
Once the trigger is created, you can add routines to it in the same way as you would add them to an area (by dragging them from the Modules pane to the target trigger or by right-clicking the needed elements and choosing the Add Selected to Trigger item from the context menu). For more information, see Adding Code to Areas.
Editing Trigger Settings
To modify trigger settings, right-click the trigger and choose Edit Trigger from the context menu or simply double-click the trigger. AQTime will show the Edit Trigger dialog where you can edit the trigger name, type and other options.
AQTime stores the trigger settings in the project file (.aqt).
To delete a trigger:
Right-click the trigger you want to delete and select Remove from the context menu.
AQTime will display a message box asking you if you want to delete the selected trigger. Click Yes to delete the trigger, or No to cancel the deletion.