The friendly Operating System for the Internet of Things
sntp.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Luminița Lăzărescu <cluminita.lazarescu@gmail.com>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
22 #ifndef SNTP_H
23 #define SNTP_H
24 
25 #include <stdint.h>
26 #include "net/sock/udp.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
41 int sntp_sync(sock_udp_ep_t *server, uint32_t timeout);
42 
48 int64_t sntp_get_offset(void);
49 
50 #ifdef __cplusplus
51 }
52 #endif
53 
54 #endif /* SNTP_H */
55 
int64_t sntp_get_offset(void)
Get real time offset from system time as returned by xtimer_now64()
UDP sock definitions.
Common IP-based transport layer end point.
Definition: sock.h:195
int sntp_sync(sock_udp_ep_t *server, uint32_t timeout)
Synchronize with time server.