susumu.yata
null+****@clear*****
Thu Jul 11 16:37:31 JST 2013
susumu.yata 2013-07-11 16:37:31 +0900 (Thu, 11 Jul 2013) New Revision: d033091fce033b349a09c7b36e3632463c80fde7 https://github.com/groonga/grnxx/commit/d033091fce033b349a09c7b36e3632463c80fde7 Message: Add comments. Modified files: lib/grnxx/periodic_clock.hpp lib/grnxx/system_clock.hpp Modified: lib/grnxx/periodic_clock.hpp (+5 -0) =================================================================== --- lib/grnxx/periodic_clock.hpp 2013-07-11 12:58:47 +0900 (75391eb) +++ lib/grnxx/periodic_clock.hpp 2013-07-11 16:37:31 +0900 (68f9a95) @@ -27,9 +27,14 @@ namespace grnxx { class PeriodicClock { public: + // Increment an internal reference count. + // Start a thread for updating "now_" when the reference count becomes 1. PeriodicClock(); + // Decrement an internal reference count. + // Stop a thread for updating "now_" when the reference count becomes 0. ~PeriodicClock(); + // Return the current time. static Time now() { return (now_ == Time::min()) ? SystemClock::now() : now_; } Modified: lib/grnxx/system_clock.hpp (+1 -0) =================================================================== --- lib/grnxx/system_clock.hpp 2013-07-11 12:58:47 +0900 (9f46332) +++ lib/grnxx/system_clock.hpp 2013-07-11 16:37:31 +0900 (c92ee3f) @@ -26,6 +26,7 @@ namespace grnxx { class SystemClock { public: + // Return the current time. static Time now(); }; -------------- next part -------------- HTML����������������������������...Download