time.hpp 449 B

1234567891011121314151617181920212223242526
  1. //
  2. // time.hpp
  3. // engine
  4. //
  5. // Created by Sam Jaffe on 9/3/16.
  6. //
  7. #pragma once
  8. #include <chrono>
  9. namespace engine {
  10. using clock = std::chrono::steady_clock;
  11. using timestamp = std::chrono::time_point<clock>;
  12. using duration = clock::duration;
  13. extern duration const FPS30;
  14. extern duration const FPS60;
  15. extern duration const FPS120;
  16. extern duration const FPS144;
  17. struct tick {
  18. timestamp now;
  19. duration since;
  20. };
  21. }