comparison src/core/time.cc @ 413:192da585a0a8 default tip

*: fix formatting the clang-format file was broken andjust using LLVM defaults. now it's fixed and is more in line with what I actually prefer my code to look like -- esp. with regards to tabulators
author Paper <paper@tflc.us>
date Sat, 25 Jul 2026 14:54:32 -0400
parents 47c9f8502269
children
comparison
equal deleted inserted replaced
412:05aed03e0111 413:192da585a0a8
73 const int hours = std::fmod(amount, days_conv) / hours_conv; 73 const int hours = std::fmod(amount, days_conv) / hours_conv;
74 const int minutes = std::fmod(amount, hours_conv) / minutes_conv; 74 const int minutes = std::fmod(amount, hours_conv) / minutes_conv;
75 const int seconds = std::fmod(amount, minutes_conv) / seconds_conv; 75 const int seconds = std::fmod(amount, minutes_conv) / seconds_conv;
76 76
77 const auto add_time_segment = [](std::ostringstream &str, int64_t amount, const std::string_view &singular, 77 const auto add_time_segment = [](std::ostringstream &str, int64_t amount, const std::string_view &singular,
78 const std::string_view &plural, bool always = false) { 78 const std::string_view &plural, bool always = false) {
79 if (amount > 0 || always) 79 if (amount > 0 || always)
80 str << amount << ((amount == 1) ? singular : plural); 80 str << amount << ((amount == 1) ? singular : plural);
81 }; 81 };
82 82
83 /* for now, this function is very en_US specific */ 83 /* for now, this function is very en_US specific */