#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include "tmfe.h"
Go to the source code of this file.
◆ main()
Definition at line 51 of file test_sleep.cxx.
52{
55
58
59
60
61
62
63
64
65
66
67
68
69 if (1) {
70 printf(
"test short sleep:\n");
71
79 test(0.01, 0.00000001);
80 }
81
82 if (1) {
85 ::alarm(10);
91 }
92
93 return 0;
94}
static double GetTime()
return current time in seconds, with micro-second precision
static void Sleep(double sleep_time_sec)
sleep, with micro-second precision
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)
◆ test()
Definition at line 17 of file test_sleep.cxx.
18{
22
24
29 }
30
32
33 double elapsed = end_time - start_time;
35
36 printf(
"sleep %7.0f loops, %12.3f usec per loop, %12.9f sec total, %12.9f sec actual total, %12.3f usec actual per loop, oversleep %8.3f usec, %6.1f%%\n",
44}
◆ test_alarm()