xref: /netbsd-src/external/gpl3/binutils.old/dist/include/timeval-utils.h (revision e992f068c547fd6e84b3f104dc2340adcc955732)
175fd0b74Schristos /* Basic struct timeval utilities.
2*e992f068Schristos    Copyright (C) 2011-2022 Free Software Foundation, Inc.
375fd0b74Schristos 
475fd0b74Schristos This file is part of the libiberty library.
575fd0b74Schristos Libiberty is free software; you can redistribute it and/or
675fd0b74Schristos modify it under the terms of the GNU Library General Public
775fd0b74Schristos License as published by the Free Software Foundation; either
875fd0b74Schristos version 2 of the License, or (at your option) any later version.
975fd0b74Schristos 
1075fd0b74Schristos Libiberty is distributed in the hope that it will be useful,
1175fd0b74Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of
1275fd0b74Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1375fd0b74Schristos Library General Public License for more details.
1475fd0b74Schristos 
1575fd0b74Schristos You should have received a copy of the GNU Library General Public
1675fd0b74Schristos License along with libiberty; see the file COPYING.LIB.  If not,
1775fd0b74Schristos write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
1875fd0b74Schristos Boston, MA 02110-1301, USA.  */
1975fd0b74Schristos 
2075fd0b74Schristos #ifndef TIMEVAL_UTILS_H
2175fd0b74Schristos #define TIMEVAL_UTILS_H
2275fd0b74Schristos 
2375fd0b74Schristos #ifdef __cplusplus
2475fd0b74Schristos extern "C" {
2575fd0b74Schristos #endif /* __cplusplus */
2675fd0b74Schristos 
2775fd0b74Schristos /* forward decl */
2875fd0b74Schristos struct timeval;
2975fd0b74Schristos 
3075fd0b74Schristos extern void timeval_add (struct timeval *result,
3175fd0b74Schristos 			 const struct timeval *a, const struct timeval *b);
3275fd0b74Schristos 
3375fd0b74Schristos extern void timeval_sub (struct timeval *result,
3475fd0b74Schristos 			 const struct timeval *a, const struct timeval *b);
3575fd0b74Schristos 
3675fd0b74Schristos #ifdef __cplusplus
3775fd0b74Schristos }
3875fd0b74Schristos #endif /* __cplusplus */
3975fd0b74Schristos 
4075fd0b74Schristos #endif /* TIMEVAL_UTILS_H */
41