I am trying to use methods of timing different actions in my scripts. For example, the way I am currently timing something (Note, the incorrect way, as it does not work on other systems), is to count the number of frames past and then perform an action. For example, if I wanted after 5 seconds for something to happen, I would count 300 seconds and then do the action. However, if the FPS is not capped at 60 fps, this action performs earlier than wanted.
What is the proper way of doing these time calculations?