Use can use setTimeout() function or Timer class.