This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

uvision: time.h undefined time symbol

hi,

could someone tell me the way to work with the time.h header file? At the moment I get the error message "undefined symbol time"

#include <stdio.h>
#include <time.h>
#include "math.h"

//....

//line which generates the error message:
time_t t = time(NULL);

I'm no sure which header file is missing... Or if there's any other error... by the way I'm working with the AT91SAM9260 controller...

best regards
Stefan

Parents
  • 1) What do you mean by "I need the RTC for the ethernet stack"? Why would your etnernet stack need to know the exact time of day or what date it is?

    2) "At the moment I'm not sure how do I get the right time?" If your unit do need absolute time, then it is up to you to figure out where/how to get the initial time into your RTC. With ethernet support, you may possibly use an SNTP implementation - a quite simple way of requesting time using UDP.

Reply
  • 1) What do you mean by "I need the RTC for the ethernet stack"? Why would your etnernet stack need to know the exact time of day or what date it is?

    2) "At the moment I'm not sure how do I get the right time?" If your unit do need absolute time, then it is up to you to figure out where/how to get the initial time into your RTC. With ethernet support, you may possibly use an SNTP implementation - a quite simple way of requesting time using UDP.

Children