+ 2

Can you provide a code to diaplay execution time of any program? (It should work in turboC)

Hello, the other day I was performing linear and binary search programs on my computer and wanted to check whether binary search is faster than linear or not. For that I needed the execution time of program. I couldn't find anything on the internet that works on turboCpp. If you have any then please post them here. would be very helpful! Thanks in advance!

6th Dec 2016, 11:12 AM
HtraP
HtraP - avatar
2 Réponses
+ 2
use <ctime> (time.h). Please refer this. http://www.cplusplus.com/reference/ctime/
6th Dec 2016, 11:44 AM
Nagendra Prajwal
Nagendra Prajwal - avatar
+ 1
Maybe other way, for Turbo C++ were developed profilers. Programs to visualize a time earned over a program, functions, loops lines of code..Try look for another of them.
6th Dec 2016, 12:50 PM
Petr Hatina
Petr Hatina - avatar