47 void print< year > ( std::ostream& aStr ,
const tm* aTm ,
const uint32_t& )
50 aStr << ( aTm->tm_year+1900 );
55 void print< yr > ( std::ostream& aStr ,
const tm* aTm ,
const uint32_t& )
57 static const char* lCharacterMapping (
"00010203040506070809"
58 "10111213141516171819"
59 "20212223242526272829"
60 "30313233343536373839"
61 "40414243444546474849"
62 "50515253545556575859"
63 "60616263646566676869"
64 "70717273747576777879"
65 "80818283848586878889"
66 "90919293949596979899" );
67 aStr.write ( lCharacterMapping + ( ( aTm->tm_year%100 ) <<1 ) , 2 );
75 static const char* lCharacterMapping (
"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec" );
76 aStr.write ( lCharacterMapping + ( aTm->tm_mon<<2 ) , 3 );
81 void print< mth > ( std::ostream& aStr ,
const tm* aTm ,
const uint32_t& )
84 static const char* lCharacterMapping (
"010203040506070809101112" );
85 aStr.write ( lCharacterMapping + ( aTm->tm_mon<<1 ) , 2 );
90 void print< day > ( std::ostream& aStr ,
const tm* aTm ,
const uint32_t& )
93 static const char* lCharacterMapping (
"xx010203040506070809"
94 "10111213141516171819"
95 "20212223242526272829"
97 aStr.write ( lCharacterMapping + ( aTm->tm_mday<<1 ) , 2 );
102 void print< hr > ( std::ostream& aStr ,
const tm* aTm ,
const uint32_t& )
105 static const char* lCharacterMapping (
"00010203040506070809"
106 "10111213141516171819"
108 aStr.write ( lCharacterMapping + ( aTm->tm_hour<<1 ) , 2 );
113 void print< min > ( std::ostream& aStr ,
const tm* aTm ,
const uint32_t& )
116 static const char* lCharacterMapping (
"00010203040506070809"
117 "10111213141516171819"
118 "20212223242526272829"
119 "30313233343536373839"
120 "40414243444546474849"
121 "50515253545556575859" );
122 aStr.write ( lCharacterMapping + ( aTm->tm_min<<1 ) , 2 );
127 void print< sec > ( std::ostream& aStr ,
const tm* aTm ,
const uint32_t& )
130 static const char* lCharacterMapping (
"00010203040506070809"
131 "10111213141516171819"
132 "20212223242526272829"
133 "30313233343536373839"
134 "40414243444546474849"
135 "50515253545556575859"
137 aStr.write ( lCharacterMapping + ( aTm->tm_sec<<1 ) , 2 );
141 void print< usec > ( std::ostream& aStr ,
const tm* ,
const uint32_t& aUsec )
144 aStr << std::setfill (
'0' ) << std::setw ( 6 ) << aUsec;
149 _Time< DefaultTimeFmt >
Time (
const timeval& aTime )
151 return _Time< DefaultTimeFmt > ( aTime );
158 gettimeofday ( &lTime, NULL );