Yes that should do it, although it's never a good idea to use wait(x) for a timed interval. Better use wait(-x) to wait x seconds instead of x frames because the time of a frame is variable.
If you want to check if the value of your calculated fps is correct, press f11 to bring up the debug panel and compare the values (they may slightly differ because of limited var accuracy)