File: rate.h

package info (click to toggle)
pcaputils 0.7-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 284 kB
  • ctags: 511
  • sloc: ansic: 2,905; makefile: 70; sh: 43
file content (23 lines) | stat: -rw-r--r-- 396 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef RATE_H
#define RATE_H

#include <stdint.h>
#include <sys/time.h>
#include <time.h>

typedef struct rate {
	unsigned call_no;
	int call_no_last;
	int call_rate;
	int gtod_rate;
	int sleep_rate;
	int cur_rate;
	struct timeval tv[2];
	struct timespec ts;
} rate_t;

rate_t *rate_new(int call_rate);
void rate_free(rate_t **);
void rate_call(rate_t *, void (fn)(void *), void *data);

#endif