doc
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
src
std
c_time.h
Go to the documentation of this file.
1
/*
2
* c_time - time functions
3
*
4
* Copyright (c) 2008 by Andreas Schneider <mail@cynapses.org>
5
*
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software Foundation,
18
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
*
20
* vim: ft=c.doxygen ts=2 sw=2 et cindent
21
*/
22
23
#ifndef _C_TIME_H
24
#define _C_TIME_H
25
26
#include <time.h>
27
#include <sys/time.h>
28
29
/**
30
* @brief Calculate time difference
31
*
32
* The c_tspecdiff function returns the time elapsed between time time1 and time
33
* time0 represented as timespec.
34
*
35
* @param time1 The time.
36
* @param time0 The time.
37
*
38
* @return time elapsed between time1 and time0.
39
*/
40
struct
timespec
c_tspecdiff
(struct timespec time1, struct timespec time0);
41
42
/**
43
* @brief Calculate time difference.
44
*
45
* The function returns the time elapsed between time clock1 and time
46
* clock0 represented as double (in seconds and milliseconds).
47
*
48
* @param clock1 The time.
49
* @param clock0 The time.
50
*
51
* @return time elapsed between clock1 and clock0 in seconds and
52
* milliseconds.
53
*/
54
double
c_secdiff
(
struct
timespec clock1,
struct
timespec clock0);
55
56
int
c_utimes
(
const
char
*uri,
const
struct
timeval *times);
57
58
#endif
/* _C_TIME_H */
Generated by
1.8.1