mirror of https://github.com/BOINC/boinc.git
parent
24c0fcc9bf
commit
7e16deb790
|
@ -212,14 +212,15 @@ int ndays_to_string (double x, int smallest_timescale, char *buf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert seconds into a string "0h00m00s00"
|
// convert seconds into a string "0h00m00s00"
|
||||||
void secs_to_hmsf(double secs, char*buf) {
|
//
|
||||||
uint s = secs;
|
void secs_to_hmsf(double secs, char* buf) {
|
||||||
uint f = (secs - s) * 100.0;
|
int s = secs;
|
||||||
uint h = s / 3600;
|
int f = (secs - s) * 100.0;
|
||||||
s -= h * 3600;
|
int h = s / 3600;
|
||||||
uint m = s / 60;
|
s -= h * 3600;
|
||||||
s -= m * 60;
|
int m = s / 60;
|
||||||
sprintf(buf, "%uh%02um%02us%02u", h, m, s, f);
|
s -= m * 60;
|
||||||
|
sprintf(buf, "%uh%02um%02us%02u", h, m, s, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert nbytes into a string. If total_bytes is non-zero,
|
// Convert nbytes into a string. If total_bytes is non-zero,
|
||||||
|
|
Loading…
Reference in New Issue