Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Yet another Windows/Linux API timing helper

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 include
Octocat-spinner-32 samples
Octocat-spinner-32 src
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.mkd
Octocat-spinner-32 wscript
README.mkd

What?

A helper for timing native Windows or Linux API calls.

Prerequisites

  • Python 2.7
  • A zip extraction utility such as 7-Zip or a Git client such as msysGit
  • On Windows, a MinGW, VC++, or Windows SDK build environment
  • Live internet connection for one-time download of the Waf cross-platform build tool

Build

  1. When building with VC++ or the Windows SDK, waf will select the build environment based upon it's --msvc_version and --msvc_targets command line options. When building with a MinGW toolchain, ensure it's on your PATH and use waf's --check-cxx-compiler command line option. If you choose to build with MinGW, I encourage you to use the DevKit. While my instructions and install script at that link are specific to Ruby, you can simply run the devkitvars.bat or devkitvars.ps1 scripts to bring the DevKit onto PATH and use it as a general purpose GCC-based build toolchain.
  2. Download and extract the project's zipball into <your_dir> or git clone https://github.com/jonforums/tma.git <your_dir> the project.
  3. cd <your_dir>
  4. python wscript prepare to download waf if not already present
  5. Windows SDK: python waf configure --msvc_version="wsdk 7.1" --msvc_targets="x86" or MinGW: python waf configure --check-cxx-compiler=g++ (use --prefix to select the installation base directory)
  6. python waf to build
  7. python waf install to install built artifacts into --prefix subdirs
  8. python waf uninstall to uninstall built artifacts
  9. python waf clean build to rebuild
  10. python waf distclean to clean everything and revert to a pristine state

NOTE: On Unix-like systems, you can typically drop python from the above build examples.

Usage

Include the hrtimer.h template header in your C++ exe or DLL and create a HiRes::Timer<HiRes::TimeUnits> instance. See examples in samples dir.

Details coming.

License

3-clause BSD. See project LICENSE file.

TODO

Something went wrong with that request. Please try again.