Calling another method to print current time