From d90ecd32b03cc16b6cf4541a3fa26a26cdaf0cbf Mon Sep 17 00:00:00 2001 From: koldo Date: Fri, 19 Feb 2010 23:26:57 +0000 Subject: [PATCH] Timer: Included basic doc git-svn-id: svn://ultimatepp.org/upp/trunk@2101 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- bazaar/Timer/Timer.upp | 16 ++++++------ bazaar/Timer/srcdoc.tpp/Timer$en-us.tpp | 34 +++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 bazaar/Timer/srcdoc.tpp/Timer$en-us.tpp diff --git a/bazaar/Timer/Timer.upp b/bazaar/Timer/Timer.upp index 02b8be78f..ce47f0333 100644 --- a/bazaar/Timer/Timer.upp +++ b/bazaar/Timer/Timer.upp @@ -1,8 +1,8 @@ -uses - Core; - -file - Timer.h, - Timer.cpp; - - +uses + Core; + +file + Timer.h, + Timer.cpp, + srcdoc.tpp; + diff --git a/bazaar/Timer/srcdoc.tpp/Timer$en-us.tpp b/bazaar/Timer/srcdoc.tpp/Timer$en-us.tpp new file mode 100644 index 000000000..c4836c7af --- /dev/null +++ b/bazaar/Timer/srcdoc.tpp/Timer$en-us.tpp @@ -0,0 +1,34 @@ +topic "Timer"; +[ $$0,0#00000000000000000000000000000000:Default] +[{_}%EN-US +[s0; [*R6 Timer]&] +[s0; &] +[s0; [2 Timer queue, usable without CtrlCore.]&] +[s0;2 &] +[s0; [2 Some characteristics:]&] +[s0;2 &] +[s0;i150;O0; [2 The Interface is the same as used from the Ctrl`::TimerCallback +in CtrlCore]&] +[s0;2 &] +[s0;i150;O0; [2 To use it one does `*not`* need CtrlCore anymore, simply +Core and Timer, where the application has a Timer instance.]&] +[s0;2 &] +[s0;i150;O0; [2 Should keep in mind, that it`'s a timer `*queue`* other +things wont get to execution, until a current task is finished, +and the timer queue can check whether time has come for the next +task.]&] +[s0;2 &] +[s0;i150;O0; [2 Because of it, the timing is not as accurate as maybe +desired and can have `"timer glitches/jitter`", depending on +work load..]&] +[s0;2 &] +[s0;i150;O0; [2 Favorite use is to schedule some `*non`*`-timing`-critical +work for `"somewhere`-around`-in`-the`-future`".]&] +[s0;2 &] +[s0;i150;O0; [2 For timing critical stuff, consider using OS native +timer means, for WIN32 SetTimer (in windowing environment, using +WM`_TIMER callback) or CreateWaitableTimer for windowing`-independent +stuff, or even QueryPerformanceCounter. for Linux/Unix/Posix +settimer function, but for Linux there is a lot anyway.]&] +[s0;2 &] +[s0; ] \ No newline at end of file