Converting seconds to hours, minutes and seconds
#2

pawn Code:
public secs2hms(secs,&hours,&minutes,&seconds) {
if (secs<0) return false;
minutes = secs / 60; seconds = secs % 60;
hours = minutes / 60; minutes = minutes % 60;
return 1;
}
pawn Code:
new h,m,s;
secs2hms(4126623,h,m,s);
printf("4126623 secs :  %d:%d:%d",h,m,s);
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)