|
μHAL (v2.7.9)
Part of the IPbus software repository
|
Go to the documentation of this file.
34 #ifndef _uhal_log_inserters_time_hpp_
35 #define _uhal_log_inserters_time_hpp_
78 typedef TimeFmt<
day,
'/',
mth,
'/',
year,
' ',
hr,
':',
min,
':',
sec>
DefaultTimeFmt;
82 template<
typename FORMAT >
class _Time;
99 _Time< TimeFmt<T0,D0,T1,D1,T2,D2,T3,D3,T4,D4,T5,D5,T6> >
Time (
const timeval& aTime );
107 _Time< TimeFmt<T0,D0,T1,D1,T2,D2,T3,D3,T4,D4,T5,' ',null> >
Time (
const timeval& aTime );
114 _Time< TimeFmt<T0,D0,T1,D1,T2,D2,T3,D3,T4,' ',null,' ',null> >
Time (
const timeval& aTime );
120 _Time< TimeFmt<T0,D0,T1,D1,T2,D2,T3,' ',null,' ',null,' ',null> >
Time (
const timeval& aTime );
125 _Time< TimeFmt<T0,D0,T1,D1,T2,' ',null,' ',null,' ',null,' ',null> >
Time (
const timeval& aTime );
129 _Time< TimeFmt<T0,D0,T1,' ',null,' ',null,' ',null,' ',null,' ',null> >
Time (
const timeval& aTime );
131 template< time_element T0 >
132 _Time< TimeFmt<T0,' ',null,' ',null,' ',null,' ',null,' ',null,' ',null> >
Time (
const timeval& aTime );
142 template<
typename FORMAT >
_Time< FORMAT > Time (
const timeval& aTime ,
const FORMAT& aFmt );
150 template<
typename FORMAT >
154 friend _Time< FORMAT > Time<> (
const timeval& aTime ,
const FORMAT& aFmt );
163 friend _Time< TimeFmt<T0,D0,T1,D1,T2,D2,T3,D3,T4,D4,T5,D5,T6> >
Time (
const timeval& aTime );
171 friend _Time< TimeFmt<T0,D0,T1,D1,T2,D2,T3,D3,T4,D4,T5,' ',null> >
Time (
const timeval& aTime );
178 friend _Time< TimeFmt<T0,D0,T1,D1,T2,D2,T3,D3,T4,' ',null,' ',null> >
Time (
const timeval& aTime );
184 friend _Time< TimeFmt<T0,D0,T1,D1,T2,D2,T3,' ',null,' ',null,' ',null> >
Time (
const timeval& aTime );
189 friend _Time< TimeFmt<T0,D0,T1,D1,T2,' ',null,' ',null,' ',null,' ',null> >
Time (
const timeval& aTime );
193 friend _Time< TimeFmt<T0,D0,T1,' ',null,' ',null,' ',null,' ',null,' ',null> >
Time (
const timeval& aTime );
195 template< time_element T0 >
196 friend _Time< TimeFmt<T0,' ',null,' ',null,' ',null,' ',null,' ',null,' ',null> >
Time (
const timeval& aTime );
213 template< time_element T >
214 void print ( std::ostream& aStr ,
const tm* aTm ,
const uint32_t& aUsec );
231 std::ostream&
operator<< ( std::ostream& aStr ,
const _Time<
TimeFmt<T0,D0,T1,D1,T2,D2,T3,D3,T4,D4,T5,D5,T6> >& aTime );
239 std::ostream&
operator<< ( std::ostream& aStr ,
const _Time<
TimeFmt<T0,D0,T1,D1,T2,D2,T3,D3,T4,D4,T5,' ',null> >& aTime );
246 std::ostream&
operator<< ( std::ostream& aStr ,
const _Time<
TimeFmt<T0,D0,T1,D1,T2,D2,T3,D3,T4,' ',null,' ',null> >& aTime );
252 std::ostream&
operator<< ( std::ostream& aStr ,
const _Time<
TimeFmt<T0,D0,T1,D1,T2,D2,T3,' ',null,' ',null,' ',null> >& aTime );
257 std::ostream&
operator<< ( std::ostream& aStr ,
const _Time<
TimeFmt<T0,D0,T1,D1,T2,' ',null,' ',null,' ',null,' ',null> >& aTime );
261 std::ostream&
operator<< ( std::ostream& aStr ,
const _Time<
TimeFmt<T0,D0,T1,' ',null,' ',null,' ',null,' ',null,' ',null> >& aTime );
263 template< time_element T0 >
264 std::ostream&
operator<< ( std::ostream& aStr ,
const _Time<
TimeFmt<T0,' ',null,' ',null,' ',null,' ',null,' ',null,' ',null> >& aTime );
time_element
Enumerated type defining the different elements which can be used for formatting a time.
@ usec
microseconds past the second formatted as exactly six digits e.g.
std::ostream & operator<<(std::ostream &aStr, const uhal::HttpResponseType &aHttpResponse)
@ yr
year formatted as two digits e.g.
@ year
year formatted as four digits e.g.
@ day
day of the month formatted as two digits e.g.
@ hr
hour of the day formatted as two digits, 24-hour clock e.g.
void print(std::ostream &aStr, const tm *aTm, const uint32_t &aUsec)
Format a time element for for sending to the log.
@ min
minutes past the hour formatted as two digits e.g.
TimeFmt< day,'/', mth,'/', year,' ', hr,':', min,':', sec > DefaultTimeFmt
Typedef the most commonly used time format (day/month/year hour:minut:second) for convenience.
A struct whose template parameters represent a time format.
@ sec
seconds past the minute formatted as two digits e.g.
timeval Now()
A helper function to return the current time.
friend _Time< DefaultTimeFmt > Time(const timeval &aTime)
Helper function which wrap the template uglyness in a pretty package.
@ strmth
month formatted as three character string e.g.
@ mth
month formatted as two digits e.g.
_Time(const timeval &aTime)
Constructor.
_Time< DefaultTimeFmt > Time(const timeval &aTime)
Helper function which wrap the template uglyness in a pretty package.