OSDN Git Service

unixtime.hpp: get_sec(), get_min(), get_hour() Add.
authorMyun2 <myun2@nwhite.info>
Tue, 29 May 2012 09:48:19 +0000 (18:48 +0900)
committerMyun2 <myun2@nwhite.info>
Tue, 29 May 2012 09:48:19 +0000 (18:48 +0900)
roast/include/roast/time/unixtime.hpp

index 16ac372..4513ac4 100644 (file)
@@ -36,6 +36,12 @@ namespace roast
                unix_time_type to_time() const { return m_time; }
                void set(const unix_time_type& tm) { m_time = tm; }
                void set_time(const unix_time_type& tm) { m_time = tm; }
+               
+               //      Time Values
+               int get_second() const { return m_unixtime % 60; }
+               int get_sec() const { return get_second(); }
+               int get_min_gmt() const { return (m_unixtime / 60) % 60; }
+               int get_hour_gmt() const { return (m_unixtime / (60*60) ) % 24; }
 
                //      To String
                ::std::string to_string() const {