]> Savannah Git Hosting - gnulib.git/commitdiff
timevar: Include documentation in gnulib manual.
authorBruno Haible <bruno@clisp.org>
Sun, 30 Sep 2018 17:27:56 +0000 (19:27 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 30 Sep 2018 17:27:56 +0000 (19:27 +0200)
* doc/timevar.texi: Change node and section name to 'Profiling of
program phases'.
In the code snippets, tweak the #includes and use GNU coding style.
* doc/gnulib.texi: Include timevar.texi.

ChangeLog
doc/gnulib.texi
doc/timevar.texi

index 03aab337a3a3f1f629f8608d8fd7ef7cea940b4f..690451b43cb46a548689290a020cb731dc341e12 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-09-30  Bruno Haible  <bruno@clisp.org>
+
+       timevar: Include documentation in gnulib manual.
+       * doc/timevar.texi: Change node and section name to 'Profiling of
+       program phases'.
+       In the code snippets, tweak the #includes and use GNU coding style.
+       * doc/gnulib.texi: Include timevar.texi.
+
 2018-09-27  Akim Demaille  <akim@lrde.epita.fr>
 
        timevar: import from Bison.
index 4ddb34dd0d8d1de8f1e50b43836d76d0f0135673..2f5305958125eedb299f22bb72283961d317c64c 100644 (file)
@@ -6367,6 +6367,7 @@ to POSIX that it can be treated like any other Unix-like platform.
 * Quoting::
 * error and progname::
 * gcd::
+* Profiling of program phases::
 * Library version handling::
 * Supporting Relocation::
 * func::
@@ -6399,6 +6400,8 @@ to POSIX that it can be treated like any other Unix-like platform.
 
 @include gcd.texi
 
+@include timevar.texi
+
 @include check-version.texi
 
 @include relocatable-maint.texi
index 86ef8115e46ba948192b51c1daa90dee7c697d59..ae818fbdd435b7bcc190a8ba07a55557a9e1c38a 100644 (file)
@@ -1,7 +1,8 @@
-@node timevar
-@section timevar
+@node Profiling of program phases
+@section Profiling of program phases
 
-A simple self-profiling module based on timers.
+The module @samp{timevar} provides a simple self-profiling facility,
+based on timers.
 
 @smallexample
 Execution times (seconds)
@@ -44,11 +45,13 @@ the following example.
 #include <config.h>
 #include "timevar.h"
 
+#include <stdio.h>
 #include "read.h"
 #include "work.h"
 #include "output.h"
 
-int main (void)
+int
+main (void)
 @{
   timevar_enabled = true;
   timevar_init ();
@@ -76,9 +79,10 @@ with, for instance, in @file{work.c}
 
 @smallexample
 #include <config.h>
-#include <work.h>
+#include "work.h"
 
-void work (void)
+void
+work (void)
 @{
   timevar_push (tv_work_phase1);
   work1 ();