aboutsummaryrefslogtreecommitdiff
path: root/gprof/hertz.c
diff options
context:
space:
mode:
Diffstat (limited to 'gprof/hertz.c')
-rw-r--r--gprof/hertz.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/gprof/hertz.c b/gprof/hertz.c
index 979ad37..5391041 100644
--- a/gprof/hertz.c
+++ b/gprof/hertz.c
@@ -21,26 +21,27 @@
#ifdef __MSDOS__
-# define HERTZ 18
+#define HERTZ 18
#endif
int
-hertz()
+hertz ()
{
#ifdef HERTZ
- return HERTZ;
+ return HERTZ;
#else
- struct itimerval tim;
+ struct itimerval tim;
- tim.it_interval.tv_sec = 0;
- tim.it_interval.tv_usec = 1;
- tim.it_value.tv_sec = 0;
- tim.it_value.tv_usec = 0;
- setitimer(ITIMER_REAL, &tim, 0);
- setitimer(ITIMER_REAL, 0, &tim);
- if (tim.it_interval.tv_usec < 2) {
- return HZ_WRONG;
- } /* if */
- return 1000000 / tim.it_interval.tv_usec;
+ tim.it_interval.tv_sec = 0;
+ tim.it_interval.tv_usec = 1;
+ tim.it_value.tv_sec = 0;
+ tim.it_value.tv_usec = 0;
+ setitimer (ITIMER_REAL, &tim, 0);
+ setitimer (ITIMER_REAL, 0, &tim);
+ if (tim.it_interval.tv_usec < 2)
+ {
+ return HZ_WRONG;
+ } /* if */
+ return 1000000 / tim.it_interval.tv_usec;
#endif
-} /* hertz */
+} /* hertz */