Blame src/microhttpd/mhd_mono_clock.h

Packit 875988
/*
Packit 875988
  This file is part of libmicrohttpd
Packit 875988
  Copyright (C) 2015 Karlson2k (Evgeny Grin)
Packit 875988
Packit 875988
  This library is free software; you can redistribute it and/or
Packit 875988
  modify it under the terms of the GNU Lesser General Public
Packit 875988
  License as published by the Free Software Foundation; either
Packit 875988
  version 2.1 of the License, or (at your option) any later version.
Packit 875988
Packit 875988
  This library is distributed in the hope that it will be useful,
Packit 875988
  but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 875988
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 875988
  Lesser General Public License for more details.
Packit 875988
Packit 875988
  You should have received a copy of the GNU Lesser General Public
Packit 875988
  License along with this library; if not, write to the Free Software
Packit 875988
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
Packit 875988
*/
Packit 875988
Packit 875988
/**
Packit 875988
 * @file microhttpd/mhd_mono_clock.h
Packit 875988
 * @brief  internal monotonic clock functions declarations
Packit 875988
 * @author Karlson2k (Evgeny Grin)
Packit 875988
 */
Packit 875988
Packit 875988
#ifndef MHD_MONO_CLOCK_H
Packit 875988
#define MHD_MONO_CLOCK_H 1
Packit 875988
#include "mhd_options.h"
Packit 875988
Packit 875988
#if defined(HAVE_TIME_H)
Packit 875988
#include <time.h>
Packit 875988
#elif defined(HAVE_SYS_TYPES_H)
Packit 875988
#include <sys/types.h>
Packit 875988
#endif
Packit 875988
Packit 875988
/**
Packit 875988
 * Initialise monotonic seconds counter.
Packit 875988
 */
Packit 875988
void
Packit 875988
MHD_monotonic_sec_counter_init(void);
Packit 875988
Packit 875988
Packit 875988
/**
Packit 875988
 * Deinitialise monotonic seconds counter by freeing any allocated resources
Packit 875988
 */
Packit 875988
void
Packit 875988
MHD_monotonic_sec_counter_finish(void);
Packit 875988
Packit 875988
Packit 875988
/**
Packit 875988
 * Monotonic seconds counter, useful for timeout calculation.
Packit 875988
 * Tries to be not affected by manually setting the system real time
Packit 875988
 * clock or adjustments by NTP synchronization.
Packit 875988
 *
Packit 875988
 * @return number of seconds from some fixed moment
Packit 875988
 */
Packit 875988
time_t
Packit 875988
MHD_monotonic_sec_counter(void);
Packit 875988
Packit 875988
#endif /* MHD_MONO_CLOCK_H */