windows: Calculates the wall-clock time used by the calling process. return:The elapsed wall-clock time since the start of the process Linux:The clock() function returns an approximation of processor time used by the program Windows: #include <stdio…