throughput.c (2764b86afdc99a30f4b1a4da2c04db8aa7aa785d) | throughput.c (565e35e50e2cdac423588a3d18742544bde128b0) |
---|---|
1/*- 2 * Copyright (c) 1997 Brian Somers <brian@Awfulhak.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1997 Brian Somers <brian@Awfulhak.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $Id: throughput.c,v 1.4.4.4 1998/04/06 09:12:37 brian Exp $ | 26 * $Id: throughput.c,v 1.4.4.5 1998/04/07 00:54:21 brian Exp $ |
27 */ 28 29#include <sys/types.h> 30 31#include <stdio.h> 32#include <termios.h> 33#include <time.h> 34 --- 9 unchanged lines hidden (view full) --- 44{ 45 int f; 46 47 t->OctetsIn = t->OctetsOut = 0; 48 for (f = 0; f < SAMPLE_PERIOD; f++) 49 t->SampleOctets[f] = 0; 50 t->OctetsPerSecond = t->BestOctetsPerSecond = t->nSample = 0; 51 t->Timer.name = "throughput"; | 27 */ 28 29#include <sys/types.h> 30 31#include <stdio.h> 32#include <termios.h> 33#include <time.h> 34 --- 9 unchanged lines hidden (view full) --- 44{ 45 int f; 46 47 t->OctetsIn = t->OctetsOut = 0; 48 for (f = 0; f < SAMPLE_PERIOD; f++) 49 t->SampleOctets[f] = 0; 50 t->OctetsPerSecond = t->BestOctetsPerSecond = t->nSample = 0; 51 t->Timer.name = "throughput"; |
52 t->uptime = 0; |
|
52 throughput_stop(t); 53} 54 55void 56throughput_disp(struct pppThroughput *t, struct prompt *prompt) 57{ 58 int secs_up; 59 --- 95 unchanged lines hidden --- | 53 throughput_stop(t); 54} 55 56void 57throughput_disp(struct pppThroughput *t, struct prompt *prompt) 58{ 59 int secs_up; 60 --- 95 unchanged lines hidden --- |