/usr/include/libzia/ztime.h is in libzia-dev 4.06-2+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | /*
portable time functions
Copyright (C) 2009-2011 Ladislav Vaiz <ok1zia@nagano.cz>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2 as published by the Free Software Foundation.
*/
#ifndef __ZTIME_H
#define __ZTIME_H
#include <libziaint.h>
#ifdef Z_HAVE_TIME_H
#include <time.h>
#endif
#ifdef Z_HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifndef Z_HAVE_SYS_TIME_H
int gettimeofday(struct timeval *tv, void *dummy);
#endif
#ifdef Z_MSC_MINGW
struct tm *gmtime_r(time_t *timep, struct tm *result);
struct tm *localtime_r(time_t *timep, struct tm *result);
time_t timegm(struct tm *tm);
int settimeofday(const struct timeval *tv, const void *zone);
#endif
#define ZTIMEOUT_MOD 10000000
int ztimeout_init(int timeout_ms);
int ztimeout_occured(int tmo);
int ztimeout_diff_ms(int *tmo);
//int ztimeout_test(int tmo, int i, int res);
/*
usage:
int tmo = ztimeout_init(miliseconds);
while(!z_timeout_occured(tmo)) { do_something(); }
*/
int zst_start(void);
int zst_stop(int reltime, const char *text);
void ST_START(void);
void ST_STOP(const char *text);
/*
usage:
int st = zst_start();
....
st = zst_stop(st, "prvni");
....
zst_stop(st, "druhy");
or
ST_START();
...
ST_STOP("prvni");
...
ST_STOP("druhy");
*/
double z_difftimeval_double(struct timeval *stop, struct timeval *start);
char *z_format_hms(char *s, int len, time_t t);
#endif
|