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
28
/**
29
* @brief Calculate time difference
30
*
31
* The c_tspecdiff function returns the time elapsed between time time1 and time
32
* time0 represented as timespec.
33
*
34
* @param time1 The time.
35
* @param time0 The time.
36
*
37
* @return time elapsed between time1 and time0.
38
*/
39
struct
timespec
c_tspecdiff
(struct timespec time1, struct timespec time0);
40
41
/**
42
* @brief Calculate time difference.
43
*
44
* The function returns the time elapsed between time clock1 and time
45
* clock0 represented as double (in seconds and milliseconds).
46
*
47
* @param clock1 The time.
48
* @param clock0 The time.
49
*
50
* @return time elapsed between clock1 and clock0 in seconds and
51
* milliseconds.
52
*/
53
double
c_secdiff
(
struct
timespec clock1,
struct
timespec clock0);
54
55
#endif
/* _C_TIME_H */
Generated by
1.8.2