Hi, I'm not terribly new at Perl, but one thing that has nagged me for a while is: how do I take an amount of time given in seconds into a nice, human-readable format?
For example, I'd like to read the system uptime from /proc/uptime and convert it to something like:
3 days, 2 hours, 18 minutesWhat would be the simplest approach to this? Is there a function like localtime() (but obviously that would return days, minutes, etc. for a duration, not a specific point in time) that will do this?
In reply to Converting Seconds to Nice Format by Segfault
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |