Added software timer functionality (not finished)