Jan 22, 2019, 10:14 AM

Hi guys. I was wondering if there is an equivalent in TinyMUX to the timestring() function?

timestring() in PennMUSH:

TIMESTRING()
  timestring(<seconds>[,<pad flag>])

  The timestring function takes a number of seconds as input and
  returns the amount of time formatted into days, hours, minutes, and
  seconds. If <pad flag> is 1, all time periods will be used even
  if the number of seconds is less than a day, hour, or minute.
  If <pad flag> is 2, all numbers will be 2 digits long.

  Example:
  > say [timestring(301)]
  You say, " 5m  1s"
  > say [timestring(301,1)]
  You say, "0d  0h  5m  1s"
  > say [timestring(301,2)]
  You say, "00d 00h 05m 01s"

Maybe exptime()? Would that do the same thing?

exptime() from MUX:

  FUNCTION: exptime(<seconds>)

  This function converts seconds to a number of time elements (hours,
  minutes, seconds) that is equivalent to the given number of
  <seconds>.

  This is very similar to the writetime() function, but the elements
  are given their short names instead of long names.

  Example:
    > say exptime(45)
    You say, "45s"
    > say exptime(12345)
    You say, "3h 25m 45s"
    > say exptime(123456)
    You say, "1d 10h 17m 36s"