Skip to content
Hapaxia edited this page May 25, 2023 · 8 revisions

Welcome to Kairos!

Introduction

Kairos is a small - header-only - library of classes that aid in simplifying timing tasks by providing event sequencing, flexible clocks (alterable speed and direction), frames-per-second information, timestep simplification and more.

Classes

  • Absorel
    Signed number type represented using an absolute value (int) and a relative value (double). Used for real numbers that require consistent accuracy.

  • Duration
    Time duration type.

  • Stopwatch
    Pausable stopwatch. Uses Duration. <chrono> is used for clock.

  • Timer
    Pausable countdown timer. Uses Stopwatch.

  • Continuum
    Flexible time control. Ability to change the speed of time (including backwards). Uses Stopwatch.

  • Timestep Lite
    Light class to help with timestep control. Does not keep track of time; this must be done manually.

  • Timestep
    Timestep control. Keeps track of time internally so no need for external clock. Has more features than the "lite" version such as an ability to pause and setting a maximum time accumulation. Uses Continuum.

  • Yalpes
    Event sequence playback system. Plays back events of any structure. Has a number of separate tracks of events. Each track stores them in a vector with a timecode (Absorel), and transfers them into a 'waiting queue' vector if time passes it. Can also automatically remove the events during the following update or can be left and new events will be added to them. Entirely template-based. Uses Absorel (for current timecode position), Duration (for current play time), and Stopwatch.

  • Basic Clock
    Basic class that provides the current time. Uses <chrono> to access the system clock.

  • FPS Lite
    Simple class for keeping track of frames per second. Updates once per second. Uses Stopwatch.

Information

All of Kairos's functions/classes are in the kairos namespace.

Kairos has one list of inclusion: <Kairos/all.hpp>
<Kairos.hpp> just includes <Kairos/all.hpp>

Kairos has no external dependencies.
Some of the examples may depend on external libraries.

Clone this wiki locally