Changeset de03334 for util.c


Ignore:
Timestamp:
Jul 3, 2003, 9:31:03 PM (18 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
5b85d19
Parents:
210c261
Message:
Idletimes now appear in the buddylist
File:
1 edited

Legend:

Unmodified
Added
Removed
  • util.c

    re6449bc rde03334  
    278278
    279279  return(argv);
     280}
     281
     282/* caller must free the return */
     283char *owl_util_seconds_to_timestr(int seconds)
     284{
     285  int days, minutes, hours;
     286  long run;
     287  char *out;
     288
     289  run=seconds;
     290
     291  days=run/86400;
     292  run-=days*86400;
     293  hours=run/3600;
     294  run-=hours*3600;
     295  minutes=run/60;
     296  run-=minutes*60;
     297
     298  if (days>0) {
     299    out=owl_sprintf("%i d %2.2i:%2.2i:%2.2li", days, hours, minutes, run);
     300  } else {
     301    out=owl_sprintf("     %2.2i:%2.2i:%2.2li", hours, minutes, run);
     302  }
     303  return(out);
    280304}
    281305
Note: See TracChangeset for help on using the changeset viewer.