aboutsummaryrefslogtreecommitdiff
path: root/lib/roken/parse_time.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/roken/parse_time.c')
-rw-r--r--lib/roken/parse_time.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/lib/roken/parse_time.c b/lib/roken/parse_time.c
index febd6a5d2bf6..f5a99e31a84b 100644
--- a/lib/roken/parse_time.c
+++ b/lib/roken/parse_time.c
@@ -50,20 +50,20 @@ static struct units time_units[] = {
{NULL, 0},
};
-ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
+ROKEN_LIB_FUNCTION int64_t ROKEN_LIB_CALL
parse_time (const char *s, const char *def_unit)
{
return parse_units (s, time_units, def_unit);
}
ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
-unparse_time (int t, char *s, size_t len)
+unparse_time(int64_t t, char *s, size_t len)
{
return unparse_units (t, time_units, s, len);
}
ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
-unparse_time_approx (int t, char *s, size_t len)
+unparse_time_approx(int64_t t, char *s, size_t len)
{
return unparse_units_approx (t, time_units, s, len);
}
@@ -73,3 +73,32 @@ print_time_table (FILE *f)
{
print_units_table (time_units, f);
}
+
+#undef parse_time
+#undef unparse_time
+#undef unparse_time_approx
+#undef print_time_table
+
+ROKEN_LIB_FUNCTION int64_t ROKEN_LIB_CALL
+parse_time(const char *s, const char *def_unit)
+{
+ return rk_parse_units(s, time_units, def_unit);
+}
+
+ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
+unparse_time(int64_t t, char *s, size_t len)
+{
+ return rk_unparse_units(t, time_units, s, len);
+}
+
+ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
+unparse_time_approx(int64_t t, char *s, size_t len)
+{
+ return rk_unparse_units_approx(t, time_units, s, len);
+}
+
+ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
+print_time_table(FILE *f)
+{
+ rk_print_units_table(time_units, f);
+}