From 09a02e9a9be391f7124ab5db6eeb300b671f8c6a Mon Sep 17 00:00:00 2001 From: "kevin.larke" Date: Fri, 17 Apr 2020 13:28:09 -0400 Subject: [PATCH] cwTime.h/cpp : Added test(). --- cwTime.cpp | 18 ++++++++++++++++++ cwTime.h | 2 ++ 2 files changed, 20 insertions(+) diff --git a/cwTime.cpp b/cwTime.cpp index fb4d4a4..9d604da 100644 --- a/cwTime.cpp +++ b/cwTime.cpp @@ -157,3 +157,21 @@ cw::rc_t cw::time::futureMs( spec_t& ts, unsigned ms ) return rc; } + + +cw::rc_t cw::time::test() +{ + + spec_t t0,t1; + + get(t0); + + futureMs(t1,1000); + + unsigned dMs = elapsedMs(t0,t1); + + printf("dMs:%i\n",dMs); + + return kOkRC; + +} diff --git a/cwTime.h b/cwTime.h index 7f31f1d..d5b3c1c 100644 --- a/cwTime.h +++ b/cwTime.h @@ -57,6 +57,8 @@ namespace cw // Advance the current time by 'ms' milliseconds; rc_t futureMs( spec_t& ts, unsigned ms ); + rc_t test(); + //) }