diff options
Diffstat (limited to 'src/H5timer.c')
-rw-r--r-- | src/H5timer.c | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/src/H5timer.c b/src/H5timer.c index dcb3dbc..ac04d15 100644 --- a/src/H5timer.c +++ b/src/H5timer.c @@ -95,41 +95,41 @@ H5_bandwidth(char *buf /*out*/, size_t bufsize, double nbytes, double nseconds) double bw; if (nseconds <= 0.0) - HDstrcpy(buf, " NaN"); + strcpy(buf, " NaN"); else { bw = nbytes / nseconds; if (H5_DBL_ABS_EQUAL(bw, 0.0)) - HDstrcpy(buf, "0.000 B/s"); + strcpy(buf, "0.000 B/s"); else if (bw < 1.0) - HDsnprintf(buf, bufsize, "%10.4e", bw); + snprintf(buf, bufsize, "%10.4e", bw); else if (bw < (double)H5_KB) { - HDsnprintf(buf, bufsize, "%05.4f", bw); - HDstrcpy(buf + 5, " B/s"); + snprintf(buf, bufsize, "%05.4f", bw); + strcpy(buf + 5, " B/s"); } else if (bw < (double)H5_MB) { - HDsnprintf(buf, bufsize, "%05.4f", bw / (double)H5_KB); - HDstrcpy(buf + 5, " kB/s"); + snprintf(buf, bufsize, "%05.4f", bw / (double)H5_KB); + strcpy(buf + 5, " kB/s"); } else if (bw < (double)H5_GB) { - HDsnprintf(buf, bufsize, "%05.4f", bw / (double)H5_MB); - HDstrcpy(buf + 5, " MB/s"); + snprintf(buf, bufsize, "%05.4f", bw / (double)H5_MB); + strcpy(buf + 5, " MB/s"); } else if (bw < (double)H5_TB) { - HDsnprintf(buf, bufsize, "%05.4f", bw / (double)H5_GB); - HDstrcpy(buf + 5, " GB/s"); + snprintf(buf, bufsize, "%05.4f", bw / (double)H5_GB); + strcpy(buf + 5, " GB/s"); } else if (bw < (double)H5_PB) { - HDsnprintf(buf, bufsize, "%05.4f", bw / (double)H5_TB); - HDstrcpy(buf + 5, " TB/s"); + snprintf(buf, bufsize, "%05.4f", bw / (double)H5_TB); + strcpy(buf + 5, " TB/s"); } else if (bw < (double)H5_EB) { - HDsnprintf(buf, bufsize, "%05.4f", bw / (double)H5_PB); - HDstrcpy(buf + 5, " PB/s"); + snprintf(buf, bufsize, "%05.4f", bw / (double)H5_PB); + strcpy(buf + 5, " PB/s"); } else { - HDsnprintf(buf, bufsize, "%10.4e", bw); - if (HDstrlen(buf) > 10) - HDsnprintf(buf, bufsize, "%10.3e", bw); + snprintf(buf, bufsize, "%10.4e", bw); + if (strlen(buf) > 10) + snprintf(buf, bufsize, "%10.3e", bw); } /* end else-if */ } /* end else */ } /* end H5_bandwidth() */ @@ -592,31 +592,30 @@ H5_timer_get_time_string(double seconds) * (name? round_up_size? ?) */ if (seconds < 0.0) - HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "N/A"); + snprintf(s, H5TIMER_TIME_STRING_LEN, "N/A"); else if (H5_DBL_ABS_EQUAL(0.0, seconds)) - HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "0.0 s"); + snprintf(s, H5TIMER_TIME_STRING_LEN, "0.0 s"); else if (seconds < 1.0E-6) /* t < 1 us, Print time in ns */ - HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "%.f ns", seconds * 1.0E9); + snprintf(s, H5TIMER_TIME_STRING_LEN, "%.f ns", seconds * 1.0E9); else if (seconds < 1.0E-3) /* t < 1 ms, Print time in us */ - HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "%.1f us", seconds * 1.0E6); + snprintf(s, H5TIMER_TIME_STRING_LEN, "%.1f us", seconds * 1.0E6); else if (seconds < 1.0) /* t < 1 s, Print time in ms */ - HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "%.1f ms", seconds * 1.0E3); + snprintf(s, H5TIMER_TIME_STRING_LEN, "%.1f ms", seconds * 1.0E3); else if (seconds < H5_SEC_PER_MIN) /* t < 1 m, Print time in s */ - HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "%.2f s", seconds); + snprintf(s, H5TIMER_TIME_STRING_LEN, "%.2f s", seconds); else if (seconds < H5_SEC_PER_HOUR) /* t < 1 h, Print time in m and s */ - HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "%.f m %.f s", minutes, remainder_sec); + snprintf(s, H5TIMER_TIME_STRING_LEN, "%.f m %.f s", minutes, remainder_sec); else if (seconds < H5_SEC_PER_DAY) /* t < 1 d, Print time in h, m and s */ - HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "%.f h %.f m %.f s", hours, minutes, remainder_sec); + snprintf(s, H5TIMER_TIME_STRING_LEN, "%.f h %.f m %.f s", hours, minutes, remainder_sec); else /* Print time in d, h, m and s */ - HDsnprintf(s, H5TIMER_TIME_STRING_LEN, "%.f d %.f h %.f m %.f s", days, hours, minutes, - remainder_sec); + snprintf(s, H5TIMER_TIME_STRING_LEN, "%.f d %.f h %.f m %.f s", days, hours, minutes, remainder_sec); return s; } /* end H5_timer_get_time_string() */ |