Mercurial > minori
changeset 306:f4538a4c91ba
cleanup: remove extraneous executable flags
line wrap: on
line diff
--- a/src/core/time.cc Sun May 19 15:56:20 2024 -0400 +++ b/src/core/time.cc Sun May 19 17:48:52 2024 -0400 @@ -49,6 +49,8 @@ return result; } +/* "amount" does not have to be in seconds, and can be any unit if the correct ratio to seconds + * is passed to "unit_in_seconds" (for example, if the input is minutes, pass 60.0) */ std::string GetSecondsAsAbsoluteString(Units unit_cutoff, Timestamp amount, double unit_in_seconds) { /* avoid calculating this twice */ const double years_conv = (31556952.0 / unit_in_seconds); @@ -93,7 +95,7 @@ int64_t GetSystemTime() { static_assert(sizeof(int64_t) >= sizeof(time_t)); time_t t = std::time(nullptr); - return reinterpret_cast<int64_t>(t); + return static_cast<int64_t>(t); } } // namespace Time