[Date Prev][Date Next] [Chronological] [Thread] [Top]

HEADS-UP: change in time representation in input files



Would anyone object if we consistently represent time intervals in input
as

[<d>d][<d>h][<d>m][<d>[s]]

so that, for example:

7d		one week
1h30m		one hour and a half
10		ten seconds
1d2h3m4s	one day, two hours, 3 minutes 4 seconds

and so?

I'd place that wherever we need to parse time.  It defaults to seconds
if no specifier is provided, so there should be no backwards
compatibility issues; I'd also preserve the current intervals syntax in
syncrepl, but generate it the new way.

The related API is now in lublutil/utils.c:

lutil_parse_time()
lutil_unparse_time()

I understand the naming is rather generic, maybe we'd want to use
something more specific.  If you believe this should be confined to
slapd only, I'll move it there and rename it slap_parse_time(),
slap_unparse_time().

p.




Ing. Pierangelo Masarati
Responsabile Open Solution

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office:   +39.02.23998309          
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it
------------------------------------------