Skip to content

Installation

imshooter edited this page Nov 26, 2026 · 2 revisions

The files

A release holds:

File Where it goes
components/Chrono.dll or components/Chrono.so The components folder of the server.
qawno/include/chrono.inc The include folder of the compiler.
LICENSE.txt and LICENSE-pawn-chrono.txt Anywhere, they are the licenses of the component and of the names it keeps.

Both builds are 32 bit, as the server is. On Windows the time zones come from Windows 10 version 1903 or later. On Linux they come from the tzdata of the system, and the build needs glibc 2.25 or later. open.mp for Linux needs the 32 bit libc and libatomic, libc6:i386 and libatomic1:i386 on Debian and Ubuntu.

The include

#include <open.mp>
#include <chrono>

chrono.inc takes the place of the include of pawn-chrono. Both give the same natives, so remove chrono from pawn.legacy_plugins.

The first start

The server log names the zone the component keeps time in:

Chrono 0.2.0 keeps time in Europe/London.

A zone in config.json that does not exist is logged as an error, and the component keeps time in UTC.

Building

CMake 3.19 or later fetches the open.mp SDK and the Pawn headers. On Windows, with Visual Studio 2022 or its Build Tools:

cmake -S . -B build -A Win32
cmake --build build --config Release

On Linux, with GCC 13 or later and its 32 bit libraries:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32 -DCMAKE_SHARED_LINKER_FLAGS=-m32
cmake --build build

The component is written to build/Release/Chrono.dll or build/Chrono.so.

Clone this wiki locally