tinydtls  0.8.6
dtls_time.h
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * Copyright (c) 2011, 2012, 2013, 2014, 2015 Olaf Bergmann (TZI) and others.
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License v1.0
6  * and Eclipse Distribution License v. 1.0 which accompanies this distribution.
7  *
8  * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
9  * and the Eclipse Distribution License is available at
10  * http://www.eclipse.org/org/documents/edl-v10.php.
11  *
12  * Contributors:
13  * Olaf Bergmann - initial API and implementation
14  *
15  *******************************************************************************/
16 
22 #ifndef _DTLS_DTLS_TIME_H_
23 #define _DTLS_DTLS_TIME_H_
24 
25 #include <stdint.h>
26 #include <sys/time.h>
27 
28 #include "tinydtls.h"
29 
37 #ifdef WITH_CONTIKI
38 #include "clock.h"
39 #else /* WITH_CONTIKI */
40 #include <time.h>
41 
42 #ifndef CLOCK_SECOND
43 # define CLOCK_SECOND 1000
44 #endif
45 
47 #endif /* WITH_CONTIKI */
48 
50 
51 #ifndef DTLS_TICKS_PER_SECOND
52 #define DTLS_TICKS_PER_SECOND CLOCK_SECOND
53 #endif /* DTLS_TICKS_PER_SECOND */
54 
55 void dtls_clock_init(void);
56 void dtls_ticks(dtls_tick_t *t);
57 
60 #endif /* _DTLS_DTLS_TIME_H_ */
public tinydtls API
void dtls_clock_init(void)
Definition: dtls_time.c:44
clock_time_t dtls_tick_t
Definition: dtls_time.h:49
uint32_t clock_time_t
Definition: dtls_time.h:46
unsigned int uint32_t
Definition: uthash.h:78
void dtls_ticks(dtls_tick_t *t)
Definition: dtls_time.c:57