- #include "Varios.h"
- void ticks_to_str(char *dst, DWORD ticks) {
- int sec, min, hr, day;
- ticks /= 1000;
- sec = ticks % 60; ticks /= 60;
- min = ticks % 60; ticks /= 60;
- hr = ticks % 24; ticks /= 24;
- day = ticks;
- if (day)
- wsprintf(dst,"%d:%02d:%02d:%02d",day,hr,min,sec);
- else if (hr)
- wsprintf(dst,"%d:%02d:%02d",hr,min,sec);
- else
- wsprintf(dst,"%d:%02d",min,sec);
- }