summaryrefslogtreecommitdiff
path: root/modules/timevar
Commit message (Collapse)AuthorAgeFilesLines
* bitset, timevar: Depend on c99Akim Demaille2019-03-171-0/+1
| | | | | Reported by Bruno Haible. * modules/bitset, modules/timevar (Depends-on): Add c99.
* Remove redundant 'Link' sections.Bruno Haible2019-01-041-4/+0
| | | | | * modules/canon-host (Link): Remove section. * modules/timevar (Link): Likewise.
* timevar: use gethrxtime to get wall clock timeAkim Demaille2018-10-141-1/+5
| | | | | | | | | | | | | | | | | clock_gettime is not portable. gethrxtime takes the best available option to get the wall clock time, including clock_gettime (monotonic clock), and gettime (non monotonic). Also, using xtime_t instead of float preserves the precision. Suggested by Bruno Haible. * lib/xtime.h (xtime_make): Handle overflows of nanoseconds. * modules/timevar (Depends-on): We need gethrxtime. We no longer use times(). (Link): Update. * lib/timevar.h (timevar_time_def): Use xtime_t. * lib/timevar.c (set_to_current_time): Use gethrxtime. (timevar_print): Instead of checking whether the timings themselves are large enough for the timevar to be printed, check the percentages.
* timevar: expect that getrusage is availableAkim Demaille2018-10-131-4/+1
| | | | | | | | | | | | | | | Don't keep both times and getrusage as backend: both are guaranteed by gnulib, a single one suffices. Using getrusage is open to possibly tracking other types of resources in the future. * modules/timevar (Depends-on): Add getrusage. (configure.ac): Remove gl_TIMEVAR. (Files): Remove m4/timevar.m4. * m4/timevar.m4: Remove, rely on gnulib for getrusage. * lib/timevar.h (timevar_enabled): Clarify documentation. * lib/timevar.c: Remove all the code about times. Remove all the CPP guards about getrusage: expect it to be present (courtesy of gnulib).
* timevar: add to lib_SOURCESAkim Demaille2018-10-071-0/+3
| | | | * modules/timevar (lib_SOURCES): Add timevar.c and timevar.def.
* timevar: rely on gnulib modules for time portability.Akim Demaille2018-10-051-1/+4
| | | | | | | | | | | * modules/timevar (Depends-on): Add sys_time, sys_times, and times. * m4/timevar.m4: Don't check for clock_t and struct tms, guaranteed by gnulib. * lib/timevar.h: Use extern "C" protection. Include <stdio.h> for FILE. * lib/timevar.c: Include sys/time.h, sys/times.h unconditionally, they are guaranteed by gnulib. Remove uses of clock as (now useless) fallback.
* timevar: Small tweaks.Bruno Haible2018-09-301-2/+2
| | | | | | | | * lib/timevar.h: Fix comments. Add parameter names to function declarations. * lib/timevar.c: Include timevar.h immediately after config.h. * lib/timevar.def: Fix comments. * modules/timevar (Maintainer): List Akim Demaille.
* timevar: import from Bison.Akim Demaille2018-09-291-0/+24
* m4/timevar.m4, modules/timevar, lib/timevar.h, lib/timevar.c: New files. * lib/timevar.def: New file. * doc/timevar.texi: New file.