xref: /netbsd-src/external/gpl3/binutils/dist/include/timeval-utils.h (revision cb63e24e8d6aae7ddac1859a9015f48b1d8bd90e)
1883529b6Schristos /* Basic struct timeval utilities.
2*cb63e24eSchristos    Copyright (C) 2011-2024 Free Software Foundation, Inc.
3883529b6Schristos 
4883529b6Schristos This file is part of the libiberty library.
5883529b6Schristos Libiberty is free software; you can redistribute it and/or
6883529b6Schristos modify it under the terms of the GNU Library General Public
7883529b6Schristos License as published by the Free Software Foundation; either
8883529b6Schristos version 2 of the License, or (at your option) any later version.
9883529b6Schristos 
10883529b6Schristos Libiberty is distributed in the hope that it will be useful,
11883529b6Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of
12883529b6Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13883529b6Schristos Library General Public License for more details.
14883529b6Schristos 
15883529b6Schristos You should have received a copy of the GNU Library General Public
16883529b6Schristos License along with libiberty; see the file COPYING.LIB.  If not,
17883529b6Schristos write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
18883529b6Schristos Boston, MA 02110-1301, USA.  */
19883529b6Schristos 
20883529b6Schristos #ifndef TIMEVAL_UTILS_H
21883529b6Schristos #define TIMEVAL_UTILS_H
22883529b6Schristos 
23883529b6Schristos #ifdef __cplusplus
24883529b6Schristos extern "C" {
25883529b6Schristos #endif /* __cplusplus */
26883529b6Schristos 
27883529b6Schristos /* forward decl */
28883529b6Schristos struct timeval;
29883529b6Schristos 
30883529b6Schristos extern void timeval_add (struct timeval *result,
31883529b6Schristos 			 const struct timeval *a, const struct timeval *b);
32883529b6Schristos 
33883529b6Schristos extern void timeval_sub (struct timeval *result,
34883529b6Schristos 			 const struct timeval *a, const struct timeval *b);
35883529b6Schristos 
36883529b6Schristos #ifdef __cplusplus
37883529b6Schristos }
38883529b6Schristos #endif /* __cplusplus */
39883529b6Schristos 
40883529b6Schristos #endif /* TIMEVAL_UTILS_H */
41