From 42d12cc51362c2ccfd95e0a0594fdfeb8db3c339 Mon Sep 17 00:00:00 2001 From: Jonas Zitzmann Date: Thu, 8 Feb 2024 18:38:43 +0100 Subject: [PATCH] add new converter: sec to hour --- src/convert_time.c | 5 +++++ src/convert_time.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/convert_time.c b/src/convert_time.c index 726ca28..42266b6 100644 --- a/src/convert_time.c +++ b/src/convert_time.c @@ -23,4 +23,9 @@ double converter_min_to_hour(double min){ double converter_hour_in_sec(double hour){ double time = hour * 60 * 60; return time; +} + +double converter_sec_in_hour(double sec){ + double time = sec / 60 / 60; + return time; } \ No newline at end of file diff --git a/src/convert_time.h b/src/convert_time.h index 56301fa..1a4b196 100644 --- a/src/convert_time.h +++ b/src/convert_time.h @@ -6,5 +6,6 @@ double converter_min_to_sec(double min); double converter_hour_to_min(double hour); double converter_min_to_hour(double min); double converter_hour_in_sec(double hour); +double converter_sec_in_hour(double sec); #endif //THEADMIRALS_CONVERT_TIME_H