kernel: scheduling fix for ARM
[minix.git] / benchmarks / unixbench-5.1.2 / src / timeit.c
blob0fb24df5cf23d78a7a79167a8fa7671b27fd3d58
1 /*******************************************************************************
2 *
3 * The BYTE UNIX Benchmarks - Release 3
4 * Module: timeit.c SID: 3.3 5/15/91 19:30:21
5 *******************************************************************************
6 * Bug reports, patches, comments, suggestions should be sent to:
8 * Ben Smith, Rick Grehan or Tom Yager
9 * ben@bytepb.byte.com rick_g@bytepb.byte.com tyager@bytepb.byte.com
11 *******************************************************************************
12 * Modification Log:
13 * May 12, 1989 - modified empty loops to avoid nullifying by optimizing
14 * compilers
15 * August 28, 1990 - changed timing relationship--now returns total number
16 * of iterations (ty)
17 * October 22, 1997 - code cleanup to remove ANSI C compiler warnings
18 * Andy Kahn <kahn@zk3.dec.com>
20 ******************************************************************************/
22 /* this module is #included in other modules--no separate SCCS ID */
25 * Timing routine
29 #include <signal.h>
30 #include <unistd.h>
32 void wake_me(int seconds, void (*func)(int))
34 /* set up the signal handler */
35 signal(SIGALRM, func);
36 /* get the clock running */
37 alarm(seconds);