diff options
author | Mattias Andrée <maandree@kth.se> | 2018-10-29 21:36:10 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2018-10-29 21:36:10 +0100 |
commit | 618ef575fb5af9365be4e72eb2c1934006cfb074 (patch) | |
tree | 2f2f46e1af8d921c4d0a933f4ca3d12384c1de4c | |
parent | Add documentation to time.h (diff) | |
download | libsimple-618ef575fb5af9365be4e72eb2c1934006cfb074.tar.gz libsimple-618ef575fb5af9365be4e72eb2c1934006cfb074.tar.bz2 libsimple-618ef575fb5af9365be4e72eb2c1934006cfb074.tar.xz |
Add man pages for {sum,diff,mul,cmp}time{spec,val}
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | TODO | 10 | ||||
l--------- | man/cmptimespec.3libsimple | 1 | ||||
l--------- | man/cmptimeval.3libsimple | 1 | ||||
l--------- | man/difftimespec.3libsimple | 1 | ||||
l--------- | man/difftimeval.3libsimple | 1 | ||||
-rw-r--r-- | man/libsimple_cmptimespec.3 | 95 | ||||
l--------- | man/libsimple_cmptimeval.3 | 1 | ||||
-rw-r--r-- | man/libsimple_difftimespec.3 | 118 | ||||
l--------- | man/libsimple_difftimeval.3 | 1 | ||||
-rw-r--r-- | man/libsimple_multimespec.3 | 115 | ||||
l--------- | man/libsimple_multimeval.3 | 1 | ||||
-rw-r--r-- | man/libsimple_sumtimespec.3 | 115 | ||||
l--------- | man/libsimple_sumtimeval.3 | 1 | ||||
l--------- | man/multimespec.3libsimple | 1 | ||||
l--------- | man/multimeval.3libsimple | 1 | ||||
l--------- | man/sumtimespec.3libsimple | 1 | ||||
l--------- | man/sumtimeval.3libsimple | 1 |
17 files changed, 455 insertions, 10 deletions
@@ -1,10 +0,0 @@ -Document: - memeq - mempset - aligned_alloc functions - posix_memalign functions - memalign functions - valloc functions - pvalloc functions - memalloc functions - arrayalloc functions diff --git a/man/cmptimespec.3libsimple b/man/cmptimespec.3libsimple new file mode 120000 index 0000000..8199c4e --- /dev/null +++ b/man/cmptimespec.3libsimple @@ -0,0 +1 @@ +libsimple_cmptimespec.3
\ No newline at end of file diff --git a/man/cmptimeval.3libsimple b/man/cmptimeval.3libsimple new file mode 120000 index 0000000..6831169 --- /dev/null +++ b/man/cmptimeval.3libsimple @@ -0,0 +1 @@ +libsimple_cmptimeval.3
\ No newline at end of file diff --git a/man/difftimespec.3libsimple b/man/difftimespec.3libsimple new file mode 120000 index 0000000..b03eae5 --- /dev/null +++ b/man/difftimespec.3libsimple @@ -0,0 +1 @@ +libsimple_difftimespec.3
\ No newline at end of file diff --git a/man/difftimeval.3libsimple b/man/difftimeval.3libsimple new file mode 120000 index 0000000..96c8b98 --- /dev/null +++ b/man/difftimeval.3libsimple @@ -0,0 +1 @@ +libsimple_difftimeval.3
\ No newline at end of file diff --git a/man/libsimple_cmptimespec.3 b/man/libsimple_cmptimespec.3 new file mode 100644 index 0000000..f4ea051 --- /dev/null +++ b/man/libsimple_cmptimespec.3 @@ -0,0 +1,95 @@ +.TH LIBSIMPLE_CMPTIMESPEC 3 2018-10-29 libsimple +.SH NAME +libsimple_cmptimespec \- calculate the sum of two durations +.SH SYNOPSIS +.nf +#include <libsimple.h> + +static inline int libsimple_cmptimespec(const struct timespec *\fIa\fP, const struct timespec *\fIb\fP); +static inline int libsimple_cmptimeval(const struct timeval *\fIa\fP, const struct timeval *\fIb\fP); + +#ifndef cmptimespec +# define cmptimespec libsimple_cmptimespec +#endif +#ifndef cmptimeval +# define cmptimeval libsimple_cmptimeval +#endif +.fi +.PP +Link with +.IR \-lsimple . +.SH DESCRIPTION +The +.BR libsimple_cmptimespec () +and +.BR libsimple_cmptimeval () +functions compares the values of +.I a +and +.IR b , +returning a value indicating which is larger, if any. +.SH RETURN VALUE +The +.BR libsimple_cmptimespec () +and +.BR libsimple_cmptimeval () +functions return \-1 if +.I a +is less than +.IR b , ++1 if +.I a +is greater than +.IR b , +and 0 otherwise. +.SH ERRORS +The +.BR libsimple_cmptimespec () +and +.BR libsimple_cmptimeval () +functions cannot fail. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_cmptimespec () +.br +.BR libsimple_cmptimeval () +T} Thread safety MT-Safe +T{ +.BR libsimple_cmptimespec () +.br +.BR libsimple_cmptimeval () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_cmptimespec () +.br +.BR libsimple_cmptimeval () +T} Async-cancel safety AC-Safe +.TE +.SH EXAMPLES +None. +.SH APPLICATION USAGE +None. +.SH RATIONALE +None. +.SH FUTURE DIRECTIONS +None. +.SH NOTES +None. +.SH BUGS +None. +.SH SEE ALSO +.BR libsimple_sumtimespec (3), +.BR libsimple_difftimespec (3), +.BR libsimple_multimespec (3), +.BR libsimple_timespectostr (3), +.BR libsimple_strtotimespec (3), +.BR libsimple_timespectodouble (3), +.BR libsimple_doubletotimespec (3), +.BR libsimple_timeval2timespec (3) diff --git a/man/libsimple_cmptimeval.3 b/man/libsimple_cmptimeval.3 new file mode 120000 index 0000000..8199c4e --- /dev/null +++ b/man/libsimple_cmptimeval.3 @@ -0,0 +1 @@ +libsimple_cmptimespec.3
\ No newline at end of file diff --git a/man/libsimple_difftimespec.3 b/man/libsimple_difftimespec.3 new file mode 100644 index 0000000..af0f7e3 --- /dev/null +++ b/man/libsimple_difftimespec.3 @@ -0,0 +1,118 @@ +.TH LIBSIMPLE_DIFFTIMESPEC 3 2018-10-29 libsimple +.SH NAME +libsimple_difftimespec \- calculate the difference of two durations +.SH SYNOPSIS +.nf +#include <libsimple.h> + +int libsimple_difftimespec(struct timespec *\fIdiff\fP, const struct timespec *\fIminuend\fP, const struct timespec *\fIsubtrahend\fP); +int libsimple_difftimeval(struct timeval *\fIdiff\fP, const struct timeval *\fIminuend\fP, const struct timeval *\fIsubtrahend\fP); + +#ifndef difftimespec +# define difftimespec libsimple_difftimespec +#endif +#ifndef difftimeval +# define difftimeval libsimple_difftimeval +#endif +.fi +.PP +Link with +.IR \-lsimple . +.SH DESCRIPTION +The +.BR libsimple_difftimespec () +and +.BR libsimple_difftimeval () +functions calculates the diffence of +.I minuend +and +.I subtrahend +.RI ( minuend +is subtracted by +.IR subtrahend ) +and stores the result in +.IR diff . +.SH RETURN VALUE +The +.BR libsimple_difftimespec () +and +.BR libsimple_difftimeval () +functions return 0 on successful completion; +otherwise, \−1 is returned and +.I errno +is set to indicate the error. +.SH ERRORS +The +.BR libsimple_difftimespec () +and +.BR libsimple_difftimeval () +functions fail if: +.TP +.B ERANGE +The result is too large or too small to be stored; if the +result is too large +.I *diff +will be set to +.I {.tv_sec=TIME_MAX,tv_nsec=999999999L} +for the +.BR libsimple_difftimespec () +function and to +.I {.tv_sec=TIME_MAX,tv_usec=999999L} +for the +.BR libsimple_difftimeval () +function, if the result is too small +.I *diff +will be set to +.I {.tv_sec=TIME_MIN,tv_nsec=0} +for the +.BR libsimple_difftimespec () +function and to +.I {.tv_sec=TIME_MIN,tv_usec=0} +for the +.BR libsimple_difftimeval () +function. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_difftimespec () +.br +.BR libsimple_difftimeval () +T} Thread safety MT-Safe +T{ +.BR libsimple_difftimespec () +.br +.BR libsimple_difftimeval () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_difftimespec () +.br +.BR libsimple_difftimeval () +T} Async-cancel safety AC-Safe +.TE +.SH EXAMPLES +None. +.SH APPLICATION USAGE +None. +.SH RATIONALE +None. +.SH FUTURE DIRECTIONS +None. +.SH NOTES +None. +.SH BUGS +None. +.SH SEE ALSO +.BR libsimple_sumtimespec (3), +.BR libsimple_multimespec (3), +.BR libsimple_cmptimespec (3), +.BR libsimple_timespectostr (3), +.BR libsimple_strtotimespec (3), +.BR libsimple_timespectodouble (3), +.BR libsimple_doubletotimespec (3), +.BR libsimple_timeval2timespec (3) diff --git a/man/libsimple_difftimeval.3 b/man/libsimple_difftimeval.3 new file mode 120000 index 0000000..b03eae5 --- /dev/null +++ b/man/libsimple_difftimeval.3 @@ -0,0 +1 @@ +libsimple_difftimespec.3
\ No newline at end of file diff --git a/man/libsimple_multimespec.3 b/man/libsimple_multimespec.3 new file mode 100644 index 0000000..0d464ee --- /dev/null +++ b/man/libsimple_multimespec.3 @@ -0,0 +1,115 @@ +.TH LIBSIMPLE_MULTIMESPEC 3 2018-10-29 libsimple +.SH NAME +libsimple_multimespec \- multiply a duration with an integer +.SH SYNOPSIS +.nf +#include <libsimple.h> + +int libsimple_multimespec(struct timespec *\fIprod\fP, const struct timespec *\fImultiplicand\fP, int \fImultiplier\fP); +int libsimple_multimeval(struct timeval *\fIprod\fP, const struct timeval *\fImultiplicand\fP, int \fImultiplier\fP); + +#ifndef multimespec +# define multimespec libsimple_multimespec +#endif +#ifndef multimeval +# define multimeval libsimple_multimeval +#endif +.fi +.PP +Link with +.IR \-lsimple . +.SH DESCRIPTION +The +.BR libsimple_multimespec () +and +.BR libsimple_multimeval () +functions calculates the product of +.I multiplicand +and +.I multiplier +and stores the result in +.IR prod . +.SH RETURN VALUE +The +.BR libsimple_multimespec () +and +.BR libsimple_multimeval () +functions return 0 on successful completion; +otherwise, \−1 is returned and +.I errno +is set to indicate the error. +.SH ERRORS +The +.BR libsimple_multimespec () +and +.BR libsimple_multimeval () +functions fail if: +.TP +.B ERANGE +The result is too large or too small to be stored; if the +result is too large +.I *diff +will be set to +.I {.tv_sec=TIME_MAX,tv_nsec=999999999L} +for the +.BR libsimple_multimespec () +function and to +.I {.tv_sec=TIME_MAX,tv_usec=999999L} +for the +.BR libsimple_multimeval () +function, if the result is too small +.I *diff +will be set to +.I {.tv_sec=TIME_MIN,tv_nsec=0} +for the +.BR libsimple_multimespec () +function and to +.I {.tv_sec=TIME_MIN,tv_usec=0} +for the +.BR libsimple_multimeval () +function. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_multimespec () +.br +.BR libsimple_multimeval () +T} Thread safety MT-Safe +T{ +.BR libsimple_multimespec () +.br +.BR libsimple_multimeval () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_multimespec () +.br +.BR libsimple_multimeval () +T} Async-cancel safety AC-Safe +.TE +.SH EXAMPLES +None. +.SH APPLICATION USAGE +None. +.SH RATIONALE +None. +.SH FUTURE DIRECTIONS +None. +.SH NOTES +None. +.SH BUGS +None. +.SH SEE ALSO +.BR libsimple_sumtimespec (3), +.BR libsimple_difftimespec (3), +.BR libsimple_cmptimespec (3), +.BR libsimple_timespectostr (3), +.BR libsimple_strtotimespec (3), +.BR libsimple_timespectodouble (3), +.BR libsimple_doubletotimespec (3), +.BR libsimple_timeval2timespec (3) diff --git a/man/libsimple_multimeval.3 b/man/libsimple_multimeval.3 new file mode 120000 index 0000000..f5d0d9d --- /dev/null +++ b/man/libsimple_multimeval.3 @@ -0,0 +1 @@ +libsimple_multimespec.3
\ No newline at end of file diff --git a/man/libsimple_sumtimespec.3 b/man/libsimple_sumtimespec.3 new file mode 100644 index 0000000..95dd30b --- /dev/null +++ b/man/libsimple_sumtimespec.3 @@ -0,0 +1,115 @@ +.TH LIBSIMPLE_SUMTIMESPEC 3 2018-10-29 libsimple +.SH NAME +libsimple_sumtimespec \- calculate the sum of two durations +.SH SYNOPSIS +.nf +#include <libsimple.h> + +int libsimple_sumtimespec(struct timespec *\fIsum\fP, const struct timespec *\fIaugend\fP, const struct timespec *\fIaddend\fP); +int libsimple_sumtimeval(struct timeval *\fIsum\fP, const struct timeval *\fIaugend\fP, const struct timeval *\fIaddend\fP); + +#ifndef sumtimespec +# define sumtimespec libsimple_sumtimespec +#endif +#ifndef sumtimeval +# define sumtimeval libsimple_sumtimeval +#endif +.fi +.PP +Link with +.IR \-lsimple . +.SH DESCRIPTION +The +.BR libsimple_sumtimespec () +and +.BR libsimple_sumtimeval () +functions calculates the sum of +.I augend +and +.I addend +and stores the result in +.IR sum . +.SH RETURN VALUE +The +.BR libsimple_sumtimespec () +and +.BR libsimple_sumtimeval () +functions return 0 on successful completion; +otherwise, \−1 is returned and +.I errno +is set to indicate the error. +.SH ERRORS +The +.BR libsimple_sumtimespec () +and +.BR libsimple_sumtimeval () +functions fail if: +.TP +.B ERANGE +The result is too large or too small to be stored; if the +result is too large +.I *sum +will be set to +.I {.tv_sec=TIME_MAX,tv_nsec=999999999L} +for the +.BR libsimple_sumtimespec () +function and to +.I {.tv_sec=TIME_MAX,tv_usec=999999L} +for the +.BR libsimple_sumtimeval () +function, if the result is too small +.I *sum +will be set to +.I {.tv_sec=TIME_MIN,tv_nsec=0} +for the +.BR libsimple_sumtimespec () +function and to +.I {.tv_sec=TIME_MIN,tv_usec=0} +for the +.BR libsimple_sumtimeval () +function. +.SH ATTRIBUTES +For an explanation of the terms used in this section, see +.BR attributes (7). +.TS +allbox; +lb lb lb +l l l. +Interface Attribute Value +T{ +.BR libsimple_sumtimespec () +.br +.BR libsimple_sumtimeval () +T} Thread safety MT-Safe +T{ +.BR libsimple_sumtimespec () +.br +.BR libsimple_sumtimeval () +T} Async-signal safety AS-Safe +T{ +.BR libsimple_sumtimespec () +.br +.BR libsimple_sumtimeval () +T} Async-cancel safety AC-Safe +.TE +.SH EXAMPLES +None. +.SH APPLICATION USAGE +None. +.SH RATIONALE +None. +.SH FUTURE DIRECTIONS +None. +.SH NOTES +None. +.SH BUGS +None. +.SH SEE ALSO +.BR libsimple_difftimespec (3), +.BR libsimple_multimespec (3), +.BR libsimple_cmptimespec (3), +.BR libsimple_timespectostr (3), +.BR libsimple_strtotimespec (3), +.BR libsimple_timespectodouble (3), +.BR libsimple_doubletotimespec (3), +.BR libsimple_timeval2timespec (3) diff --git a/man/libsimple_sumtimeval.3 b/man/libsimple_sumtimeval.3 new file mode 120000 index 0000000..2bfd9e9 --- /dev/null +++ b/man/libsimple_sumtimeval.3 @@ -0,0 +1 @@ +libsimple_sumtimespec.3
\ No newline at end of file diff --git a/man/multimespec.3libsimple b/man/multimespec.3libsimple new file mode 120000 index 0000000..f5d0d9d --- /dev/null +++ b/man/multimespec.3libsimple @@ -0,0 +1 @@ +libsimple_multimespec.3
\ No newline at end of file diff --git a/man/multimeval.3libsimple b/man/multimeval.3libsimple new file mode 120000 index 0000000..ff93d2b --- /dev/null +++ b/man/multimeval.3libsimple @@ -0,0 +1 @@ +libsimple_multimeval.3
\ No newline at end of file diff --git a/man/sumtimespec.3libsimple b/man/sumtimespec.3libsimple new file mode 120000 index 0000000..2bfd9e9 --- /dev/null +++ b/man/sumtimespec.3libsimple @@ -0,0 +1 @@ +libsimple_sumtimespec.3
\ No newline at end of file diff --git a/man/sumtimeval.3libsimple b/man/sumtimeval.3libsimple new file mode 120000 index 0000000..f4df894 --- /dev/null +++ b/man/sumtimeval.3libsimple @@ -0,0 +1 @@ +libsimple_sumtimeval.3
\ No newline at end of file |