Timestamp.h 588 B

12345678910111213141516171819202122232425262728
  1. #ifndef ANKI_CORE_TIMESTAMP_H
  2. #define ANKI_CORE_TIMESTAMP_H
  3. #include "anki/util/StdTypes.h"
  4. namespace anki {
  5. /// Timestamp type
  6. typedef U32 Timestamp;
  7. /// Increase the current timestamp. Should be called in the main loop
  8. inline void increaseGlobTimestamp()
  9. {
  10. extern Timestamp globTimestamp;
  11. ++globTimestamp;
  12. }
  13. /// Give the current timestamp. It actually gives the current frame. Used to
  14. /// indicate updates. It is actually returning the current frame
  15. inline Timestamp getGlobTimestamp()
  16. {
  17. extern Timestamp globTimestamp;
  18. return globTimestamp;
  19. }
  20. } // end namespace anki
  21. #endif