Quantcast
Channel: Checking to see if the current time is close to 9PM - Code Review Stack Exchange
Browsing all 2 articles
Browse latest View live

Answer by Davislor for Checking to see if the current time is close to 9PM

This is already in the Standard Library. Use std::chrono::utc_clock from <chrono>, and compute the duration:const auto now = std::chrono::utc_clock::now();const auto time_of_day = now -...

View Article



Checking to see if the current time is close to 9PM

I want to check if the current time is "close" to 9pm UTC. I have the following code to a.) get "now" and convert it to UTC time and b.) get 9pm utc time.Based off when I run it, it looks like it's...

View Article
Browsing all 2 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>