X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=ETL%2Ftrunk%2FETL%2F_clock_system.h;h=0e43d4da848438619d14846e8900728318e5008f;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=9ad2d41df17de1ce4d339c02fe92c98d3d75bac3;hpb=b3016b249333ac0ab0008d8c6c4d9029b2ff30c9;p=synfig.git diff --git a/ETL/trunk/ETL/_clock_system.h b/ETL/trunk/ETL/_clock_system.h index 9ad2d41..0e43d4d 100644 --- a/ETL/trunk/ETL/_clock_system.h +++ b/ETL/trunk/ETL/_clock_system.h @@ -1,7 +1,7 @@ /*! ======================================================================== ** Extended Template and Library ** Proc Clock Description Implementation -** $Id: _clock_system.h,v 1.1.1.1 2005/01/04 01:31:47 darco Exp $ +** $Id$ ** ** Copyright (c) 2002 Robert B. Quattlebaum Jr. ** @@ -61,7 +61,7 @@ class clock_desc_sys_clock { public: typedef float value_type; - + inline static bool realtime() { return false; } @@ -80,7 +80,7 @@ public: protected: typedef clock_t timestamp; - + static void get_current_time(timestamp &time) { time=__sys_clock(); } @@ -88,28 +88,28 @@ protected: static timestamp get_current_time() { return __sys_clock(); } - + static value_type timestamp_to_seconds(const timestamp &x) - { return precision()*x; } + { return precision()*x; } static timestamp seconds_to_timestamp(const value_type &x) - { return (timestamp)(x*(value_type)CLOCKS_PER_SEC+0.5); } - + { return (timestamp)(x*(value_type)CLOCKS_PER_SEC+0.5); } + }; class clock_desc_sys_time { public: typedef float value_type; - + inline static bool realtime() { return true; } inline static bool proctime() { return false; } - + inline static value_type one_second() { return 1.0f; } @@ -122,7 +122,7 @@ public: protected: typedef time_t timestamp; - + static void get_current_time(timestamp &time) { __sys_time(&time); } @@ -130,14 +130,14 @@ protected: static timestamp get_current_time() { return __sys_time(NULL); } - + static value_type timestamp_to_seconds(const timestamp &x) - { return (value_type)x; } + { return (value_type)x; } static timestamp seconds_to_timestamp(const value_type &x) - { return (timestamp)(x+(value_type)0.5f); } + { return (timestamp)(x+(value_type)0.5f); } }; _ETL_END_NAMESPACE