GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - NikolasK-source/cxxitimer: A C++ Library to handle linux interval timer

This repository was archived by the owner on Apr 23, 2026. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

30 Commits
30 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
cmake_files
cmake_files
 
 
code_generation_templates
code_generation_templates
 
 
include
include
 
 
scripts
scripts
 
 
src
src
 
 
test
test
 
 
.clang-format
.clang-format
 
 
.clang-tidy
.clang-tidy
 
 
.clang-tidy-noerrors
.clang-tidy-noerrors
 
 
.gitignore
.gitignore
 
 
CMakeLists.txt
CMakeLists.txt
 
 
ClangFormat.cmake
ClangFormat.cmake
 
 
Doxyfile.in
Doxyfile.in
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
compileropts.cmake
compileropts.cmake
 
 
define.cmake
define.cmake
 
 
setup.cmake
setup.cmake
 
 
warnings.cmake
warnings.cmake
 
 

Repository files navigation

cxxitimer

A C++ Library to handle linux interval timer

Interval Timer Types

Each timer type can exist only once per application.

  • ITimer_Real counts down in real time.
  • ITimer_Virtual counts down against the user-mode CPU time consumed by the process.
  • ITimer_Prof counts down against the total CPU time consumed by the process.

Usage

In the following replace ITimer_XXX with the desired timer type.

Create Interval Timer

const timeval interval = {1, 0};
cxxitimer::ITimer_XXX itimer(interval);
const double interval = 1.0;
cxxitimer::ITimer_XXX itimer(interval);
const timeval initial_interval = {2, 0};
const timeval interval = {1, 0};
cxxitimer::ITimer_XXX itimer(interval, initial_interval);
const double initial_interval = 2.0;
const double interval = 1.0;
cxxitimer::ITimer_XXX itimer(interval, initial_interval);

Start/Stop Interval Timer

itimer.start();
itimer.stop();

Change interval

Note: Timer must be stopped.

const timeval interval = {1, 500'000};
itimer.set_interval(interval);
const double interval = 2.5;
itimer.set_interval(interval);

Manipulate Timer Speed

Note: can be applied it the timer is running

// slow down timer
itmer.set_speed_factor(0.75);
// speed up timer
itmer.set_speed_factor(1.25);
// reset timer to original interval
itimer.set_speed_to_normal();

About

A C++ Library to handle linux interval timer

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.