timerfind — Find visible timer objects by exact property value.
timerfind returns valid timer handles whose ObjectVisibility is on and whose properties exactly match the supplied name-value filters.
Syntax
timers = timerfind
timers = timerfind(Name, Value, ...)Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Name,Value | Any | Variadic | — | Property filters matched by exact value. |
Returns
| Name | Type | Description |
|---|---|---|
timers | Any | Matching timer handle, empty cell row, or cell row of timer handles. |
Errors
| Identifier | When | Message |
|---|---|---|
RunMat:timer:InvalidInput | A timer argument, property, or callback value has an unsupported type. | timer: invalid input |
RunMat:timer:InvalidProperty | A timer property name is unknown, read-only, or has an invalid value. | timer: invalid property |
RunMat:timer:InvalidHandle | A lifecycle method receives a non-timer or invalid timer handle. | timer: invalid timer handle |
RunMat:timer:CallbackFailed | A timer callback fails. | timer: callback failed |
RunMat:timer:GcFailure | A timer object cannot be allocated, rooted, read, or mutated. | timer: object storage failed |
How timerfind works
timerfindreturns all visible valid timers in the current runtime thread.timerfind(Name, Value, ...)applies exact property matches. Character rows are normalized to strings for matching.- A single match returns a scalar timer handle. Zero or multiple matches return a 1-by-N cell row because RunMat does not yet have first-class MATLAB object arrays.
- Deleted timers are removed from discovery. Timers with
ObjectVisibility='off'are omitted; usetimerfindallto include invisible timers.
Does RunMat run timerfind on the GPU?
timerfind is host-side handle registry lookup and has no GPU behavior.
Example
Find timers by tag
t = timer('Tag', 'batch', 'TimerFcn', @tick);
found = timerfind('Tag', 'batch')Using timerfind with coding agents
Open a RunMat example with live inputs, then ask the agent to explain how timerfind changes the result.
Run a small timerfind example, explain the result, then change one input and compare the output.
Related Timing functions
Open-source implementation
Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how timerfind is executed, line by line, in Rust.
- View the source for timerfind in Rust on GitHub
- Learn how the RunMat runtime works
- Found a bug? Open an issue with a minimal reproduction.
About RunMat
RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.
- RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
- Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.