Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
clock.h
00001 /** 00002 * \defgroup clock Clock interface 00003 * 00004 * The clock interface is the interface between the \ref timer "timer library" 00005 * and the platform specific clock functionality. The clock 00006 * interface must be implemented for each platform that uses the \ref 00007 * timer "timer library". 00008 * 00009 * The clock interface does only one this: it measures time. The clock 00010 * interface provides a macro, CLOCK_SECOND, which corresponds to one 00011 * second of system time. 00012 * 00013 * \sa \ref timer "Timer library" 00014 * 00015 * @{ 00016 */ 00017 00018 /* 00019 * Copyright (c) 2004, Swedish Institute of Computer Science. 00020 * All rights reserved. 00021 * 00022 * Redistribution and use in source and binary forms, with or without 00023 * modification, are permitted provided that the following conditions 00024 * are met: 00025 * 1. Redistributions of source code must retain the above copyright 00026 * notice, this list of conditions and the following disclaimer. 00027 * 2. Redistributions in binary form must reproduce the above copyright 00028 * notice, this list of conditions and the following disclaimer in the 00029 * documentation and/or other materials provided with the distribution. 00030 * 3. Neither the name of the Institute nor the names of its contributors 00031 * may be used to endorse or promote products derived from this software 00032 * without specific prior written permission. 00033 * 00034 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 00035 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00036 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00037 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 00038 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00039 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00040 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00041 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00042 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00043 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00044 * SUCH DAMAGE. 00045 * 00046 * This file is part of the uIP TCP/IP stack 00047 * 00048 * Author: Adam Dunkels <adam@sics.se> 00049 * 00050 * $Id: clock.h,v 1.3 2006/06/11 21:46:39 adam Exp $ 00051 */ 00052 #ifndef __CLOCK_H__ 00053 #define __CLOCK_H__ 00054 00055 #include "clock-arch.h" 00056 00057 /** 00058 * Initialize the clock library. 00059 * 00060 * This function initializes the clock library and should be called 00061 * from the main() function of the system. 00062 * 00063 */ 00064 void clock_init(void); 00065 00066 /** 00067 * Get the current clock time. 00068 * 00069 * This function returns the current system clock time. 00070 * 00071 * \return The current clock time, measured in system ticks. 00072 */ 00073 clock_time_t clock_time(void); 00074 00075 /** 00076 * A second, measured in system clock time. 00077 * 00078 * \hideinitializer 00079 */ 00080 #ifdef CLOCK_CONF_SECOND 00081 #define CLOCK_SECOND CLOCK_CONF_SECOND 00082 #else 00083 #define CLOCK_SECOND (clock_time_t)32 00084 #endif 00085 00086 #endif /* __CLOCK_H__ */ 00087 00088 /** @} */
Generated on Tue Jul 12 2022 12:52:12 by
1.7.2