Parametrized constructor to specify timer interval added.