Back to project page 4est.
The source code is released under:
MIT License
If you think the Android project 4est listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.wordsaretoys.rise.utility; /* w ww . ja v a2s . c om*/ /** * convenience class for generating time deltas */ public class Interval { long time; public Interval() { time = System.nanoTime(); } public float next() { long t = System.nanoTime(); float dt = (float)(t - time) * 1e-9f; time = t; // reject intervals that are too long return (dt < 0.5f) ? dt : 0; } }