Setting time interval externally