Reputation: 960
I am trying to extend the system call for my_time
.
I am extending timekeeping.c for it. But its giving me random time.
struct timeval tv;
// get the current time
do_gettimeofday(&tv);
current_time->tv_sec=tv.tv_sec;
current_time->tv_nsec=tv.tv_usec*1000;
return( current_time->tv_nsec);
Upvotes: 1
Views: 280
Reputation: 960
I figured it out. Actually time is nanoseconds so its not random. Its just for each seconds its showing high deviation
Upvotes: 1