Typica is a free program for professional coffee roasters. https://typica.us
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

clock.cpp 467B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*244:*/
  2. #line 52 "./clock.w"
  3. #include "clock.h"
  4. /*245:*/
  5. #line 61 "./clock.w"
  6. Clock::Clock():QObject(NULL)
  7. {
  8. reference.start();
  9. }
  10. Clock::~Clock()
  11. {
  12. }
  13. /*:245*//*246:*/
  14. #line 79 "./clock.w"
  15. qint64 Clock::timestamp()
  16. {
  17. guard.lock();
  18. qint64 retval= reference.elapsed();
  19. guard.unlock();
  20. emit newTime(retval);
  21. return retval;
  22. }
  23. void Clock::setEpoch()
  24. {
  25. guard.lock();
  26. reference.restart();
  27. guard.unlock();
  28. emit newTime(0);
  29. }
  30. /*:246*/
  31. #line 55 "./clock.w"
  32. /*:244*/