reworked time function to allow seconds instead of frames in scripts