59 time_t time(time_t *pt);
73time_t
set_time(time_t time_to_set, uint32_t fraction=0);
100BOOL SetNTPTime(
IPADDR ntpserver);
113BOOL SetTimeNTPFromPool(
bool debug = FALSE);
126time_t GetNTPTime(
IPADDR NTP_server_ip, uint32_t * pFraction=0);
129#define TWELVE_HOURS_SECS (12*3600)
130#define ONE_DAY_SECS (14*3600)
154class NtpClientServlet:
public servlet,
public config_obj,
public TimeOutElement
165servlet_list * m_pWhoToReJoin;
172 virtual int AddToSelectSet(fd_set &rd_set, fd_set &wr_set, fd_set &er_set);
173 virtual void ProcessSelectResult(fd_set &rd_set, fd_set &wr_set, fd_set &er_set);
175 virtual void TimeElementEvent();
185 NtpClientServlet(
const char* NTP_Server=
"pool.ntp.org",uint32_t update_interval_sec=TWELVE_HOURS_SECS);
197 NtpClientServlet(servlet_list * List_To_Join,
const char* NTP_Server=
"pool.ntp.org",uint32_t update_interval_sec=TWELVE_HOURS_SECS);
231 bool RefreshNow(uint32_t ticks_to_wait);
242 bool WaitForValid(uint32_t ticks_to_wait);
251 inline time_t GetSecsSinceUpdate() {
return Secs-last_update; }
Used to hold and manipulate IPv4 and IPv6 addresses in dual stack mode.
Definition ipv6_addr.h:41
Lightweight alternative to C++ CString class.
Definition nbstring.h:118
Signed 32-bit Integer Configuration Variable.
Definition config_obj.h:649
Base class used to create configuration objects.
Definition config_obj.h:277
String Configuration Variable.
Definition config_obj.h:1055
Configuration object header file.
void tzsetchar(const char *tzenv)
Set the system local time.
time_t timegm(struct tm *bts)
Returns the value of type time_t that represents the GMT time described by the tm structure pointed b...
time_t set_time(time_t time_to_set, uint32_t fraction=0)
Set the system time to the value passed in the time_t parameter.
OSFlags enables a function or task to pend on multiple flags or events.
Definition nbrtos.h:1262