Question about TIMEOUT applet.

Harald Becker ralda at
Tue Jul 16 22:39:33 UTC 2013


here is a first version of a duration helper function. As
Bernhard suggested, it always works with float (double) values,
but if required we can add a version using only integers and the
bare minimum of required suffixes (d, h, m, s).

The current version allows for the following suffixes:

  w = weeks
  d = days
  h = hours
  m = minutes
  s = seconds (default if no suffix)
  u = microseconds
  n = nanoseconds

In addition it understands fancy combined duration specifications


GNU libc even allows for hexadecimal values:

   0xFFFF -> 65535 seconds

This is a first version, looking for comments.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: strtots.c
Type: text/x-csrc
Size: 2759 bytes
Desc: not available
URL: <>

More information about the busybox mailing list