X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=common%2Fprec_timer.h;h=4a5bf9be57ddb246f745c17fb45b91b868ba0b94;hb=5422850939eee2b223eff6a0274c5d3c1fbe68bb;hp=d0a11e74ac26405d3ca19404cf3431534a710fc9;hpb=8c61df76c4b35ab58316f35b6a09a3f977efd596;p=casparcg diff --git a/common/prec_timer.h b/common/prec_timer.h index d0a11e74a..4a5bf9be5 100644 --- a/common/prec_timer.h +++ b/common/prec_timer.h @@ -21,6 +21,8 @@ #pragma once +#include + namespace caspar { class prec_timer @@ -28,13 +30,18 @@ class prec_timer public: prec_timer(); + void tick(double interval) + { + tick_millis(static_cast(interval * 1000.0)); + } + // Author: Ryan M. Geiss // http://www.geisswerks.com/ryan/FAQS/timing.html - void tick(double interval); + void tick_millis(int64_t interval); private: unsigned long time_; }; -} \ No newline at end of file +}