https://github.com/bhallstein/wtools
Small standalone C++ helpers for hobbyist game projects. Windows & Mac.
https://github.com/bhallstein/wtools
Last synced: about 1 year ago
JSON representation
Small standalone C++ helpers for hobbyist game projects. Windows & Mac.
- Host: GitHub
- URL: https://github.com/bhallstein/wtools
- Owner: bhallstein
- Created: 2020-05-05T19:41:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-06T22:48:57.000Z (about 4 years ago)
- Last Synced: 2025-03-14T13:44:10.157Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 991 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
WTimer
======
WTimer is a small, standlone highish-resolution timer class, useful for quick ’n dirty profiling, getting inter-frame update times, etc.
#include "WTimer.h"
WTimer t;
// do something
unsigned long task1_duration = t.getMicroseconds();
t.reset();
// do something else
unsigned long task2_duration = t.getMicroseconds();
(Repo-ising because I find I want this type of thing all the time, but always forget exactly how `gettimeofday` works.)
WTimer was modified from the Ogre source code. It was once part of my erstwhile [W](http://ben.am/w) library.
– Ben Hallstein, Oct 2014