Is there any way to get the cuurent time using C in LINUX. I tried with
clock_get time(). But i'm getting the same time for a particular amout of function call. The code i've used is given below. Is there any way to get the time in an higher resolution.
write()
{
struct timespec time0;
clock_gettime(CLOCK_REALTIME,&time0);
printf("writetime=%lu",time0.tv_nsec);
}
main()
{
......
for(i=0;i<15;i++)
write();
....
}
Thank You