You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1002 B

11 months ago
11 months ago
  1. #include "convert_time.h"
  2. // Converts Seconds to Minutes
  3. double converter_sec_to_min(double sec){
  4. double time = sec / 60;
  5. return time;
  6. }
  7. // Converts Minutes to Seconds
  8. double converter_min_to_sec(double min){
  9. double time = min * 60;
  10. return time;
  11. }
  12. // Converts Hours to Minutes
  13. double converter_hour_to_min(double hour){
  14. double time = hour * 60;
  15. return time;
  16. }
  17. // Converts Minutes To Hours
  18. double converter_min_to_hour(double min){
  19. double time = min / 60;
  20. return time;
  21. }
  22. // Converts Hours in Seconds
  23. double converter_hour_in_sec(double hour){
  24. double time = hour * 60 * 60;
  25. return time;
  26. }
  27. // Converts Seconds in Hours
  28. double converter_sec_in_hour(double sec){
  29. double time = sec / 60 / 60;
  30. return time;
  31. }
  32. // Converts Days in Years
  33. double converter_days_to_years(double days){
  34. double time = days / 365;
  35. return time;
  36. }
  37. // convert Years in days
  38. double converter_years_to_days(double years){
  39. double amount = years * 365;
  40. return amount;
  41. }