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 
30 // Add the platform specific timer includes to define the Timer struct
31 #include "timer_linux.h"
32 
41 typedef struct Timer Timer;
42 
51 char expired(Timer*);
52 
61 void countdown_ms(Timer*, unsigned int);
62 
71 void countdown(Timer*, unsigned int);
72 
81 int left_ms(Timer*);
82 
90 void InitTimer(Timer*);
91 
92 #endif //__TIMER_INTERFACE_H_
void countdown_ms(Timer *, unsigned int)
Create a timer (milliseconds)
Definition: timer.c:33
void InitTimer(Timer *)
Initialize a timer.
Definition: timer.c:54
Definition: timer_linux.h:29
char expired(Timer *)
Check if a timer is expired.
Definition: timer.c:26
void countdown(Timer *, unsigned int)
Create a timer (seconds)
Definition: timer.c:40
int left_ms(Timer *)
Check the time remaining on a give timer.
Definition: timer.c:47