diff src/core/time.cc @ 306:f4538a4c91ba

cleanup: remove extraneous executable flags
author Paper <paper@paper.us.eu.org>
date Sun, 19 May 2024 17:48:52 -0400
parents 91ac90a34003
children da2c5a8ff306
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