Automatic heating time calculation