static GLUSfloat glusWindowGetElapsedTime(GLUSvoid) { static GLUSboolean init = GLUS_FALSE; static GLUSfloat lastTime; static GLUSfloat currentTime; GLUSfloat measuredTime; measuredTime = (GLUSfloat)_glusOsGetRawTime(); if (!init) { lastTime = measuredTime; currentTime = measuredTime; init = GLUS_TRUE; } else { lastTime = currentTime; currentTime = measuredTime; } return currentTime - lastTime; }
GLUSfloat GLUSAPIENTRY glusTimeGetTimestampf() { return (GLUSfloat)_glusOsGetRawTime(); }