Run the Live Match Timer

The live match screen turns a fixture into a running game: a clock you start at kick-off, pause at the break and resume for the second half, while goals, cards and substitutions are recorded against the elapsed time. In 4league the server keeps the clock — the time you see is read back from the backend, not your phone — so the same match looks identical on every device. This guide covers who can run the timer, how to start, pause and resume it, and what happens when you finish.

ℹ️
Available on the web, too

The live match screen is not mobile-only. You can run the timer and record events from iOS, Android and the 4league web app. The one place the web differs is where it sends you after you finish — see After You Finish.

Who Can Run the Timer

Running the live timer is gated by the same rule that protects every other match action — userCanManageMatch in the backend (middleware/ownership.js), enforced on startMatch, logMatchTime and endMatch. Three kinds of user are allowed:

Who Condition
Organizer / co-organizer A competition admin or owner can always run the live match.
Assigned referee A referee assigned to that match — an entry in the match’s referees list linked to the user — can run it.
Team Manager of a playing team Only when the competition has managersCanAddScore enabled. With that on, a manager of either playing team can run the live match.

Anyone outside these three roles is blocked: the controls don’t appear, and the backend rejects the request with noRights. This is the same rule used for entering a final score.

Start the Match Clock

From the fixture, open the live match screen and start the clock when the teams kick off.

1

Open the live match screen

From the competition schedule, open the fixture and enter live mode. Before the match’s scheduled time you’ll see a “match not started yet” notice and a countdown.

2

Wait for kick-off to be near

The Start button stays disabled until the fixture’s scheduled kick-off time is reached. You can’t start a match early — this keeps the recorded elapsed time honest.

3

Tap Start

Tap Start. The app calls GET /competition/startMatch/:matchId; the backend marks the match inProgress, writes the first LiveScoreTime entry, and pushes a “match started” notification to everyone following the competition. The clock begins to run.

Pause & Resume

The running clock has a Stop and, once paused, a Resume control. Use Stop at half-time and Resume for the second half.

Action What it sends
Stop / pause GET /competition/logMatchTime/:matchId/:time/1 — a time event with the stop flag set. The clock freezes.
Resume GET /competition/logMatchTime/:matchId/:time — a time event without the stop flag. The clock continues from where the server left it.

Every pause and resume is a row in the match’s LiveScoreTime timeline. The backend adds up the gaps between resume and stop markers to know exactly how much time has actually been played — not how long the screen has been open.

The Server Keeps the Time

ℹ️
LiveScoreTime is authoritative

The clock you see is computed by the server from the LiveScoreTime timeline, not ticked locally by your device. When the screen loads it reads the server’s elapsed time and pause state; the local cache is only a fallback when the server payload is missing. That’s why two people watching the same live match see the same clock.

If the competition is configured with rounds (matchRoundDuration set), the timer auto-stops at the end of each round. When you pause and the played time has passed the round’s duration, the server marks that break as the end of the round and the elapsed time snaps to the round boundary. The clock for the next round starts cleanly from there rather than carrying over a few stray seconds.

After You Finish

When the game is over you end the match from the timer (POST /competition/endMatch/:matchId). The backend finalises the result using the recorded events and the server-side elapsed time, then the app takes you out of live mode.

ℹ️
Where you land differs on web

On iOS and Android the app simply goes back to the screen you came from. On the web app it navigates to the match’s Edit Match screen instead. This is deliberate: a web deep-link into live mode often has no history to go back to, so going back would drop you out of the competition entirely — routing to Edit Match keeps you inside the competition with the final, post-match data loaded.

⏱️
Scenario: Referee Runs the Clock from the Touchline

A referee opens the fixture on her phone a minute before kick-off — Start is still greyed out. At the whistle it enables; she taps Start and the clock runs. At half-time she taps Stop, and for the second half Resume. Meanwhile the home organizer is watching the same match in the web app and sees the identical clock, because both read it from the server. When the final whistle blows she ends the match; her phone goes back to the schedule, while the organizer’s web app opens the finished match’s Edit screen.