have code for starting time after opening window