Timers
Run countdowns and stopwatches, add time for every sub in a sub-a-thon, and react when a timer runs low or hits zero.
A timer is a countdown or a stopwatch CroStream runs for you: a break timer, a “stream ends in” clock, a sub-a-thon that gains time for every sub. Macros start, pause and change it, you can control it from the Timers page, overlays can show it, and a trigger fires when it runs low or reaches zero.
Timers are built in; they need no connection.
The Timers page
Section titled “The Timers page”Open Timers in the sidebar (under Automate). Each timer is a card showing:
- a big live clock, its label and a copy chip for
{timer.<name>}; - chips for its state (Running, Paused, Finished, Ready, or Past zero for a countdown running into negative time), its kind, its cap and what it does at zero;
- buttons: Start (which becomes Pause and Resume), Reset and Set…, which opens a box to Add, Subtract or Set to a time;
- quick adjustment buttons such as +1m, +5m, +10m, with a +/− switch that flips them to subtract;
- Edit and Delete.
Timer settings
Section titled “Timer settings”| Setting | What it does |
|---|---|
| Name | The timer’s key, used in {timer.<name>}. Lowercase letters, digits, - and _, up to 40 characters. It can’t change after you create the timer; to rename it for display, change the label. |
| Label | The name people see, such as Sub-a-thon. |
| Description | A note for yourself. |
| Kind of timer | Countdown (counts down to zero, and can be given more time) or Stopwatch (counts up from 0:00). It can’t change after you create the timer. |
| Start time | Countdown only. Where it starts, and where Reset sends it back to, such as 10m. |
| Cap | Countdown only. The most time it can have left, such as 12h for a sub-a-thon. Empty is no limit. |
| At zero | Countdown only. Stop (it stays at 0:00), Count past zero (it keeps running into negative time, shown with a minus) or Restart (it starts again from the start time). |
| Keep running when the app restarts | On by default. See Restarts. Off: the timer starts over each time CroStream starts. |
| Quick adjustments | Up to 8 durations, separated by commas, for the buttons on the Timers page. |
Times are written like 90s, 5m, 1h30m, 5:00 (minutes and seconds) or
1:30:00 (hours, minutes and seconds). A bare number is seconds. No time can
be longer than 10 days, and the start time can’t be above the cap.
Use a timer in a macro
Section titled “Use a timer in a macro”Show it in any text
Section titled “Show it in any text”Write {timer.<name>} in any text a macro sends. It shows the time at that
moment as H:MM:SS, or M:SS under an hour. {timer.<name>.seconds} is the
whole seconds, for a condition or a calculation.
Note: Your own variables win
If the macro sets a value with the same name (a step whose ID is
timer, say), that one is used instead.
Timer actions
Section titled “Timer actions”The Timers group of the palette has twelve actions. Seven control a timer:
| Action | What it does |
|---|---|
| Start a timer | Starts it. A countdown continues from the time it has left, or from its start time; an amount starts it from there instead. |
| Pause a timer | Freezes a running timer. |
| Resume a timer | Continues a paused timer. |
| Reset a timer | Stops it and sends it back to its start: a countdown to its start time (or the amount you give), a stopwatch to zero. |
| Set a timer’s time | Sets the time a countdown has left, or a stopwatch has counted. A countdown never goes above its cap. |
| Add time to a timer | Adds time, up to the cap. |
| Subtract time from a timer | Takes time off, down to zero. |
They all report {remaining} (seconds), {clock} (H:MM:SS), {running}
and {added}: how many seconds this step really changed the timer by, after
the cap and after stopping at zero. The amount of Add, Subtract and
Set takes {variables}, such as {amount}s.
The other five manage timers:
| Action | What it does | Outputs |
|---|---|---|
| Read a timer | Reads its time and settings without changing it. | {remaining}, {seconds}, {clock}, {running}, {ends_at}, {elapsed}, {label}, {mode}, {duration}, {cap} |
| Create a timer | Makes a timer. If the name exists, it fails or keeps the existing one, as you choose. | {remaining} |
| Change a timer’s settings | Edits the label, description, start time, cap, at-zero behavior, persistence or quick adjustments. | {remaining} |
| Delete a timer | Removes it and its state. | {remaining} |
| List timers | Lists every timer. | {names}, {count} |
Full details are in the Actions reference.
React to a timer
Section titled “React to a timer”| Event | Fires when |
|---|---|
| Timer started | A timer is started. |
| Timer paused | A timer is paused. |
| Timer resumed | A paused timer is resumed. |
| Timer finished | A countdown reaches zero. |
| Time added to a timer | Time is added or subtracted, with the amount that really changed it after the cap. Pick added, subtracted or any. It doesn’t appear in the activity feed. |
| Timer is running low | A running countdown runs down to a Time left you set, such as 1m. It fires once, and again after time is added and it runs down again. |
| Timer created and Timer deleted | A timer is made or removed. |
The macro gets {timer}, {label}, {mode}, {remaining}, {clock},
{running}, {how}, {cause}, {amount} and {added}, plus {threshold}
for running low. See the Events reference.
Timer finished fires exactly when a countdown reaches zero, not up to a
second later. If a countdown ran out while CroStream was closed, it fires once
when CroStream starts, and {cause} is while offline.
Check a timer in a condition
Section titled “Check a timer in a condition”An If step can check the live values Timer is running, Timer time left (in seconds) and Timer exists. See Conditions.
Recipe: a sub-a-thon
Section titled “Recipe: a sub-a-thon”A countdown that gains time for every sub, gift and cheer, but never more than 12 hours.
- On the Timers page, make a Countdown named
subathon, labeled Sub-a-thon, Start time2h, Cap12h, At zero Stop, and quick adjustments1m, 5m, 10m. - Make a macro
Subathon subwith one Add time to a timer step: Timersubathon, Amount5m. Make a trigger on Subscription that runs it. - For gifts, make a macro with Add time to a timer, Amount
{count}m, and a trigger on Gifted subs.{count}is the number of subs in the gift, so five gifted subs add five minutes. An amount can use{variables}but isn’t a calculation: pick a unit that makes one sub worth a whole number of minutes or seconds. - For bits, Amount
{bits}son a trigger for Cheer or power-up adds a second per bit. - When you’re ready, run a Start a timer step (or click Start on the Timers page). Add a trigger on Timer finished to announce the end.
Show the clock with a timer widget from the gallery on an overlay, bound to subathon. The
cap holds the clock at 12 hours however many subs arrive; the {added} output
of the step tells you how much of a sub’s time really counted.
When CroStream restarts
Section titled “When CroStream restarts”A timer that is kept across restarts keeps its state, running or not. A running countdown keeps its end time, so the clock is right when you start CroStream again, and the time it spent closed counts. A countdown that reached zero in the meantime fires Timer finished once, as described above. A timer that isn’t kept starts over from its beginning each time.
Timers in overlays
Section titled “Timers in overlays”Overlays and custom widgets read a timer as the data key timer.<name>, in the
shape timer widgets have always read. See
Overlay data.
Free plan
Section titled “Free plan”The free plan has 1 timer. Subscribers to Haliebug13 on Twitch have unlimited timers.
If you’re over the limit, for example after a subscription lapses, your timers keep running: macros and the Timers page can still start, pause and change them. Editing their settings and adding timers need a subscription. Deleting is always allowed.
Timers from earlier versions
Section titled “Timers from earlier versions”Timers made before this page existed, by the old Control a timer action or by a timer widget on an overlay, appear on the Timers page by themselves, all of them, even on the free plan. Their clocks and any cap carry over and nothing on your overlays changes.
- The old name keeps working as an alias, in macros, conditions and overlay widgets.
- The old Control a timer action (Overlays group) keeps working in existing macros but isn’t offered for new steps. Use the Timers actions instead.
Related
Section titled “Related”- Macros, Triggers and Actions.
- Overlays and Overlay data.
- Schedules for things that happen at a time of day.
- Config file and API.