code for retrieving system time in a device driver
i have been trying to modify a device driver. I want to write a code
to retrieve the system date and time. My code runs fine as a normal c
program but it does not even compile when I insert the same in a
Can you tell me whats wrong?
Here is the segment of code:
struct timeval* tv;
struct timezone* tz;
struct tm *timeVar;
timeVar = localtime((time_t*)&tv.tv_sec);
There is a compile time error in localtime function. it says
assignment makes pointer from integer without a cast. But I guess i am
Let me know anyone found out what wrong i am doing.