I'm trying to design a code in C for a class that will tell me how long it takes to run a function in milliseconds. My professor suggested that I use chrono to do this, but I can't get chrono to work on my system. When I try something like the code below, I get "fatal error: chrono: No such file or directory."
#include <chrono>
int main()
{
return 0;
}
I have tried the following compilier commands, but they aren't working
gcc prog.c
or
gcc -std=c++11 prog.c
(This works if I change the program to prog.cc but my professor requires that all programs be .c).
I am using PuTTY provided by my school, a gcc compiler, and C as the programming language.
Please help!