aboutsummaryrefslogtreecommitdiff
path: root/gprof/hertz.c
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1995-02-08 02:35:44 +0000
committerKen Raeburn <raeburn@cygnus>1995-02-08 02:35:44 +0000
commit12516a373c27abe4516c2a3c84cfe9d94f02e18f (patch)
tree20c1b81fb9d0ec20120f35bb71eb436f652788c8 /gprof/hertz.c
parent28860f46fa46ce73225d72ad6a0f72739ca8295c (diff)
downloadgdb-12516a373c27abe4516c2a3c84cfe9d94f02e18f.zip
gdb-12516a373c27abe4516c2a3c84cfe9d94f02e18f.tar.gz
gdb-12516a373c27abe4516c2a3c84cfe9d94f02e18f.tar.bz2
ran "indent -gnu"; have not fixed block comment style
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 */