blob: 1485a034ec6d2d8770568379228e4a33834f2e63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include <sys/time.h>
#include <time.h>
#include <signal.h>
#include "timespec.h" /* gnulib gettime */
typedef void (*sighandler_t)(int);
void benchmark_cipher (int debug_level);
void benchmark_tls (int debug_level);
struct benchmark_st
{
struct timespec start;
unsigned long size;
sighandler_t old_handler;
#if defined(_WIN32)
HANDLE wtimer;
HANDLE wthread;
LARGE_INTEGER alarm_timeout;
#endif
};
extern int benchmark_must_finish;
void start_benchmark(struct benchmark_st * st);
double stop_benchmark(struct benchmark_st * st, const char* metric);
|