Added the time interval in the UI.Also I tested it (not thoroughly) to make sure it works.