# Time Control

<figure><img src="/files/t94OyUAGqw0KXbcyIdaz" alt=""><figcaption></figcaption></figure>

This is a time tracking system designed to monitor and display the working hours of agents within an organization, such as a police department in a FiveM roleplay server. The system provides both a **detailed history of clock-ins and clock-outs** and a **leaderboard of top workers** based on total minutes worked.

On the left side, the “Time History” panel shows individual sessions for a specific agent. Each row contains:

* **Agent**: The name and badge ID of the agent (e.g., Daniel Lopez (0000)).
* **Clock In / Clock Out**: The start and end time of the session.
* **Total**: The duration of the session in minutes.

At the bottom, there's pagination to browse through the complete history, and a dynamic message to indicate the currently displayed records.

On the right, the “Top Workers” panel ranks agents based on their accumulated minutes. This ranking gives visibility into the most active personnel.

The second image shows the underlying database structure. Each row represents a time record and includes the following fields:

* `id`: Unique identifier for the time record.
* `citizenid`: Unique citizen identifier, used to associate logs with in-game players.
* `name`: The agent’s name with badge ID.
* `clockin` / `clockout`: Timestamps marking the start and end of a work session.
* `minutes`: Total minutes worked for that session.
* `job`: The job name (e.g., `police`), which can be used to separate records by department.

This structure makes it easy to store, query, and aggregate work time per agent or department, enabling systems like shift validation, leaderboard rewards, and activity tracking.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.origennetwork.store/origen-police/guide-of-use/police-cad/time-control.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
