AWS IoT Embedded C Device SDK
timer_interface.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2014 IBM Corp.
3  *
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 v1.0 which accompany this distribution.
7  *
8  * The Eclipse Public License is available at
9  * http://www.eclipse.org/legal/epl-v10.html
10  * and the Eclipse Distribution License is available at
11  * http://www.eclipse.org/org/documents/edl-v10.php.
12  *
13  * Contributors:
14  * Allan Stockdill-Mander - initial API and implementation and/or initial documentation
15  *******************************************************************************/
16 
27 #ifndef __TIMER_INTERFACE_H_
28 #define __TIMER_INTERFACE_H_
29 
33 #include "timer_platform.h"
34 
35 #include <stdint.h>
36 #include <stdbool.h>
37 
46 typedef struct Timer Timer;
47 
56 bool has_timer_expired(Timer *);
57 
66 void countdown_ms(Timer *, uint32_t);
67 
76 void countdown_sec(Timer *, uint32_t);
77 
86 uint32_t left_ms(Timer *);
87 
95 void init_timer(Timer *);
96 
97 #endif //__TIMER_INTERFACE_H_
void countdown_ms(Timer *, uint32_t)
Create a timer (milliseconds)
Definition: timer.c:35
uint32_t left_ms(Timer *)
Check the time remaining on a given timer.
Definition: timer.c:42
Definition: timer_platform.h:29
bool has_timer_expired(Timer *)
Check if a timer is expired.
Definition: timer.c:28
void countdown_sec(Timer *, uint32_t)
Create a timer (seconds)
Definition: timer.c:53
void init_timer(Timer *)
Initialize a timer.
Definition: timer.c:60