[go: up one dir, main page]

Menu

[897c37]: / mlib / lib / age.lpc  Maximize  Restore  History

Download this file

23 lines (20 with data), 341 Bytes

string
show_age(int i)
{
    string ret;

    ret = "\t";
    if (i/43200) {
	ret += (i/43200 + " days ");
	i = i - (i/43200)*43200;
    }
    if (i/1800) {
	ret += (i/1800 + " hours ");
	i = i  - (i/1800)*1800;
    }
    if (i/30) {
	ret += (i/30 + " minutes ");
	i = i - (i/30)*30;
    }
    ret += (i*2 + " seconds.");
    return ret;
}