1
/* @(#)misc.c 1.1 98/08/16 Copyright 1998 J. Schilling */
4
"@(#)misc.c 1.1 98/08/16 Copyright 1998 J. Schilling";
7
* Misc support functions
9
* Copyright (c) 1998 J. Schilling
12
* This program is free software; you can redistribute it and/or modify
13
* it under the terms of the GNU General Public License as published by
14
* the Free Software Foundation; either version 2, or (at your option)
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU General Public License for more details.
22
* You should have received a copy of the GNU General Public License
23
* along with this program; see the file COPYING. If not, write to
24
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
31
EXPORT void timevaldiff __PR((struct timeval *start, struct timeval *stop));
34
timevaldiff(start, stop)
35
struct timeval *start;
40
tv.tv_sec = stop->tv_sec - start->tv_sec;
41
tv.tv_usec = stop->tv_usec - start->tv_usec;
42
while (tv.tv_usec > 1000000) {
43
tv.tv_usec -= 1000000;
46
while (tv.tv_usec < 0) {
47
tv.tv_usec += 1000000;