File: timefunc.h

package info (click to toggle)
xymon 4.3.30-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,288 kB
  • sloc: ansic: 69,112; sh: 3,595; makefile: 857; javascript: 452; perl: 48
file content (33 lines) | stat: -rw-r--r-- 1,458 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*----------------------------------------------------------------------------*/
/* Xymon monitor library.                                                     */
/*                                                                            */
/* Copyright (C) 2002-2011 Henrik Storner <henrik@storner.dk>                 */
/*                                                                            */
/* This program is released under the GNU General Public License (GPL),       */
/* version 2. See the file "COPYING" for details.                             */
/*                                                                            */
/*----------------------------------------------------------------------------*/

#ifndef __TIMEFUNC_H__
#define __TIMEFUNC_H__

extern time_t fakestarttime;
extern char *timestamp;

extern time_t getcurrenttime(time_t *retparm);
#define time(X) getcurrenttime(X)

extern void init_timestamp(void);
extern char *timespec_text(char *spec);
extern struct timespec *tvdiff(struct timespec *tstart, struct timespec *tend, struct timespec *result);
extern int within_sla(char *holidaykey, char *timespec, int defresult);
extern int periodcoversnow(char *tag);
extern char *histlogtime(time_t histtime);
extern int durationvalue(char *dur);
extern char *durationstring(time_t secs);
extern char *agestring(time_t secs);
extern time_t timestr2timet(char *s);
extern time_t eventreport_time(char *timestamp);

#endif