Blame iscsiuio/src/uip/clock.h

Packit Service 646995
/**
Packit Service 646995
 * \defgroup clock Clock interface
Packit Service 646995
 *
Packit Service 646995
 * The clock interface is the interface between the \ref timer "timer library"
Packit Service 646995
 * and the platform specific clock functionality. The clock
Packit Service 646995
 * interface must be implemented for each platform that uses the \ref
Packit Service 646995
 * timer "timer library".
Packit Service 646995
 *
Packit Service 646995
 * The clock interface does only one this: it measures time. The clock
Packit Service 646995
 * interface provides a macro, CLOCK_SECOND, which corresponds to one
Packit Service 646995
 * second of system time.
Packit Service 646995
 *
Packit Service 646995
 * \sa \ref timer "Timer library"
Packit Service 646995
 *
Packit Service 646995
 * @{
Packit Service 646995
 */
Packit Service 646995
Packit Service 646995
/*
Packit Service 646995
 * Copyright (c) 2004, Swedish Institute of Computer Science.
Packit Service 646995
 * All rights reserved.
Packit Service 646995
 *
Packit Service 646995
 * Redistribution and use in source and binary forms, with or without
Packit Service 646995
 * modification, are permitted provided that the following conditions
Packit Service 646995
 * are met:
Packit Service 646995
 * 1. Redistributions of source code must retain the above copyright
Packit Service 646995
 *    notice, this list of conditions and the following disclaimer.
Packit Service 646995
 * 2. Redistributions in binary form must reproduce the above copyright
Packit Service 646995
 *    notice, this list of conditions and the following disclaimer in the
Packit Service 646995
 *    documentation and/or other materials provided with the distribution.
Packit Service 646995
 * 3. Neither the name of the Institute nor the names of its contributors
Packit Service 646995
 *    may be used to endorse or promote products derived from this software
Packit Service 646995
 *    without specific prior written permission.
Packit Service 646995
 *
Packit Service 646995
 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
Packit Service 646995
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Packit Service 646995
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Packit Service 646995
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
Packit Service 646995
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Packit Service 646995
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Packit Service 646995
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Packit Service 646995
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
Packit Service 646995
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
Packit Service 646995
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
Packit Service 646995
 * SUCH DAMAGE.
Packit Service 646995
 *
Packit Service 646995
 * This file is part of the uIP TCP/IP stack
Packit Service 646995
 *
Packit Service 646995
 * Author: Adam Dunkels <adam@sics.se>
Packit Service 646995
 *
Packit Service 646995
 */
Packit Service 646995
#ifndef __CLOCK_H__
Packit Service 646995
#define __CLOCK_H__
Packit Service 646995
Packit Service 646995
#include "clock-arch.h"
Packit Service 646995
Packit Service 646995
/**
Packit Service 646995
 * Initialize the clock library.
Packit Service 646995
 *
Packit Service 646995
 * This function initializes the clock library and should be called
Packit Service 646995
 * from the main() function of the system.
Packit Service 646995
 *
Packit Service 646995
 */
Packit Service 646995
void clock_init(void);
Packit Service 646995
Packit Service 646995
/**
Packit Service 646995
 * Get the current clock time.
Packit Service 646995
 *
Packit Service 646995
 * This function returns the current system clock time.
Packit Service 646995
 *
Packit Service 646995
 * \return The current clock time, measured in system ticks.
Packit Service 646995
 */
Packit Service 646995
clock_time_t clock_time(void);
Packit Service 646995
Packit Service 646995
/**
Packit Service 646995
 * A second, measured in system clock time.
Packit Service 646995
 *
Packit Service 646995
 * \hideinitializer
Packit Service 646995
 */
Packit Service 646995
#ifdef CLOCK_CONF_SECOND
Packit Service 646995
#define CLOCK_SECOND CLOCK_CONF_SECOND
Packit Service 646995
#else
Packit Service 646995
#define CLOCK_SECOND (clock_time_t)32
Packit Service 646995
#endif
Packit Service 646995
Packit Service 646995
#endif /* __CLOCK_H__ */
Packit Service 646995
Packit Service 646995
/** @} */