Exploring date and time with chrono

There is a hobby project that I’m doing and found myself in need of using date/time facilities available in the chrono library. My tasks at this stage are simple:

  1. Get the current date and time
  2. Get date and time beginning midnight
  3. Do some comparison between (1) and (2)

There are two clocks of interest in the chrono library: system_clock and steady_clock. What is a clock you may ask? Well, in this context, a clock is a time provider that has a starting point (epoch) and tick rate.