2016-08-07 22:32:11 +08:00
|
|
|
/****************************************************************************
|
2016-07-11 06:14:25 +08:00
|
|
|
* sched/clock/clock_timekeeping.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
|
|
|
* Author: Max Neklyudov <macscomp@gmail.com>
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in
|
|
|
|
* the documentation and/or other materials provided with the
|
|
|
|
* distribution.
|
|
|
|
* 3. Neither the name NuttX nor the names of its contributors may be
|
|
|
|
* used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
|
|
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
|
|
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
|
|
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
|
|
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
|
|
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*
|
2016-08-07 22:32:11 +08:00
|
|
|
****************************************************************************/
|
2016-07-11 06:14:25 +08:00
|
|
|
|
|
|
|
#ifndef __SCHED_CLOCK_CLOCK_TIMEKEEPING_H
|
|
|
|
#define __SCHED_CLOCK_CLOCK_TIMEKEEPING_H
|
|
|
|
|
2016-08-07 22:32:11 +08:00
|
|
|
/****************************************************************************
|
2016-07-11 06:14:25 +08:00
|
|
|
* Included Files
|
2016-08-07 22:32:11 +08:00
|
|
|
****************************************************************************/
|
2016-07-11 06:14:25 +08:00
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
#include <nuttx/compiler.h>
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#include <nuttx/clock.h>
|
|
|
|
|
2016-08-07 22:32:11 +08:00
|
|
|
/****************************************************************************
|
2016-07-11 06:14:25 +08:00
|
|
|
* Public Function Prototypes
|
2016-08-07 22:32:11 +08:00
|
|
|
****************************************************************************/
|
2016-07-11 06:14:25 +08:00
|
|
|
|
|
|
|
int clock_timekeeping_get_wall_time(FAR struct timespec *ts);
|
|
|
|
int clock_timekeeping_set_wall_time(FAR struct timespec *ts);
|
|
|
|
|
|
|
|
void clock_update_wall_time(void);
|
|
|
|
|
|
|
|
void clock_inittimekeeping(void);
|
|
|
|
|
|
|
|
#endif /* __SCHED_CLOCK_CLOCK_TIMEKEEPING_H */
|