Introduction

A small footprint package implementing single threaded timers by taking the application frame rate as a clock. Each application using FPSTiming should simply:

  1. Instantiate a single TimingHandler.
  2. Schedule some tasks to be executed periodically, see registerTask(TimingTask).
  3. Register some animation objects registerAnimator(Animator).
  4. Call handle() from within the application main event loop.

Hacking

The package is developed as a git subtree (see also “here”). It should thus be made part of a bigger (container) project (see Figure 1).

Initial setup

First (and only) time setup. Here <my_repo> is the project repo where you plan to include the FPSTiming tree.

1
2
3
4
git clone <my_repo>
cd <my_repo>
git remote add -f fpstiming https://github.com/remixlab/fpstiming_tree.git
git subtree add --prefix src/remixlab/fpstiming fpstiming master --squash

Now git push will push the tree into your remote repo. From now on you will be able to use your repo as any other basic git repo:

1
2
3
4
5
#clone it:
git clone <my_repo>
cd <my_repo>
#If you want to submit changes to some the trees please
#refer to: https://help.github.com/articles/using-pull-requests

Read-write access setup (only for developers who have been granted read-write access to the trees)

(do the initial setup above first)

Clone the repo and add the remotes:

1
2
3
git clone <my_repo>
cd <my_repo>
git remote add -f fpstiming https://github.com/remixlab/fpstiming_tree.git

To update the FPSTiming subtree:

1
2
3
#fetching command:
git fetch fpstiming master
git subtree pull --prefix src/remixlab/fpstiming fpstiming master --squash

To contribute to the main project:

1
git push

To contribute to the FPSTiming subtree:

1
git subtree push --prefix=src/remixlab/fpstiming fpstiming master