Your method is correct. But you can also count the framerate by messuring the time it takes to render a frame, this will not be updating only once per second. The most accurate way to do this is to use this functions: