astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v1.1.1 »
- Astropy Core Package Utilities (`astropy.utils`) »
- human_time

# human_time

`astropy.utils.console.``human_time`(seconds)

  Returns a human-friendly time string that is always exactly 6 characters long.

  Depending on the number of seconds given, can be one of:

      1w 3d
      2d 4h
      1h 5m
      1m 4s
        15s

  Will be in color if console coloring is turned on.

  Parameters:

  seconds : int

  > The number of seconds to represent

  Returns:

  time : str

  > A human-friendly representation of the given number of seconds that is always exactly 6 characters.