Original Post
I want to be able to get two kinds of time values: (1) The "delta time" between two frames. (2) The total time elapsed relative to some base time (say the application start). For (2), I also need to add that I don't want the time when the application is paused to be counted. There seems to be two ways I can implement (2). Use a double and add time incrementally to it every frame, provided the application is not paused: if( !paused ) timeElapsed += timeDelta; Another way is to save the base time when the application starts, and then look at the difference between that time and a later time: baseTime = getTime(); // init at app start ... timeNow = getTime(); timeElapsed = timeNow - baseTime; This second approach will require me to adjust baseTime by the amount of paused time so that paused time is not counted. Is there any preference between these two methods? I naturally like the first for no real reason, but the DXSDK's CDXUTTimer uses the second method, so I'm wondering if there is any good reason.