added wxTimeSpan::Millisecond[s]() for consistency

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-04-02 00:58:44 +00:00
parent 9c21e80bb0
commit bd35ed323f
2 changed files with 57 additions and 0 deletions

View File

@@ -28,8 +28,11 @@ No base class
\latexignore{\rtfignore{\wxheading{Function groups}}} \latexignore{\rtfignore{\wxheading{Function groups}}}
\membersection{Static functions}\label{timespanstaticfunctions} \membersection{Static functions}\label{timespanstaticfunctions}
\helpref{Milliseconds}{wxtimespanmilliseconds}\\
\helpref{Millisecond}{wxtimespanmillisecond}\\
\helpref{Seconds}{wxtimespanseconds}\\ \helpref{Seconds}{wxtimespanseconds}\\
\helpref{Second}{wxtimespansecond}\\ \helpref{Second}{wxtimespansecond}\\
\helpref{Minutes}{wxtimespanminutes}\\ \helpref{Minutes}{wxtimespanminutes}\\
@@ -41,10 +44,12 @@ No base class
\helpref{Weeks}{wxtimespanweeks}\\ \helpref{Weeks}{wxtimespanweeks}\\
\helpref{Week}{wxtimespanweek} \helpref{Week}{wxtimespanweek}
\membersection{Constructors}\label{timespanconstructors} \membersection{Constructors}\label{timespanconstructors}
\helpref{wxTimeSpan}{wxtimespanctor} \helpref{wxTimeSpan}{wxtimespanctor}
\membersection{Accessors}\label{timespanaccessors} \membersection{Accessors}\label{timespanaccessors}
\helpref{GetSeconds}{wxtimespangetseconds}\\ \helpref{GetSeconds}{wxtimespangetseconds}\\
@@ -54,6 +59,7 @@ No base class
\helpref{GetWeeks}{wxtimespangetweeks}\\ \helpref{GetWeeks}{wxtimespangetweeks}\\
\helpref{GetValue}{wxtimespangetvalue} \helpref{GetValue}{wxtimespangetvalue}
\membersection{Operations}\label{timespanoperations} \membersection{Operations}\label{timespanoperations}
\helpref{Add}{wxtimespanadd}\\ \helpref{Add}{wxtimespanadd}\\
@@ -63,6 +69,7 @@ No base class
\helpref{Neg}{wxtimespanneg}\\ \helpref{Neg}{wxtimespanneg}\\
\helpref{Abs}{wxtimespanabs} \helpref{Abs}{wxtimespanabs}
\membersection{Tests}\label{timespantests} \membersection{Tests}\label{timespantests}
\helpref{IsNull}{wxtimespanisnull}\\ \helpref{IsNull}{wxtimespanisnull}\\
@@ -72,6 +79,7 @@ No base class
\helpref{IsLongerThan}{wxtimespanislongerthan}\\ \helpref{IsLongerThan}{wxtimespanislongerthan}\\
\helpref{IsShorterThan}{wxtimespanisshorterthan} \helpref{IsShorterThan}{wxtimespanisshorterthan}
\membersection{Formatting time spans}\label{timespanformatting} \membersection{Formatting time spans}\label{timespanformatting}
\helpref{Format}{wxtimespanformat} \helpref{Format}{wxtimespanformat}
@@ -84,6 +92,7 @@ No base class
\wxheading{Members} \wxheading{Members}
}} }}
\membersection{wxTimeSpan::Abs}\label{wxtimespanabs} \membersection{wxTimeSpan::Abs}\label{wxtimespanabs}
\constfunc{wxTimeSpan}{Abs}{\void} \constfunc{wxTimeSpan}{Abs}{\void}
@@ -91,6 +100,7 @@ No base class
Returns the absolute value of the timespan: does not modify the Returns the absolute value of the timespan: does not modify the
object. object.
\membersection{wxTimeSpan::Add}\label{wxtimespanadd} \membersection{wxTimeSpan::Add}\label{wxtimespanadd}
\constfunc{wxTimeSpan}{Add}{\param{const wxTimeSpan\& }{diff}} \constfunc{wxTimeSpan}{Add}{\param{const wxTimeSpan\& }{diff}}
@@ -101,18 +111,21 @@ object.
Returns the sum of two timespans. Returns the sum of two timespans.
\membersection{wxTimeSpan::Days}\label{wxtimespandays} \membersection{wxTimeSpan::Days}\label{wxtimespandays}
\func{static wxTimespan}{Days}{\param{long }{days}} \func{static wxTimespan}{Days}{\param{long }{days}}
Returns the timespan for the given number of days. Returns the timespan for the given number of days.
\membersection{wxTimeSpan::Day}\label{wxtimespanday} \membersection{wxTimeSpan::Day}\label{wxtimespanday}
\func{static wxTimespan}{Day}{\void} \func{static wxTimespan}{Day}{\void}
Returns the timespan for one day. Returns the timespan for one day.
\membersection{wxTimeSpan::Format}\label{wxtimespanformat} \membersection{wxTimeSpan::Format}\label{wxtimespanformat}
\func{wxString}{Format}{\param{const wxChar * }{format = wxDefaultTimeSpanFormat}} \func{wxString}{Format}{\param{const wxChar * }{format = wxDefaultTimeSpanFormat}}
@@ -144,66 +157,77 @@ interpreted as $2$. Otherwise, it is $50$.
The same applies to all other format specifiers: if they follow a specifier of The same applies to all other format specifiers: if they follow a specifier of
larger unit, only the rest part is taken, otherwise the full value is used. larger unit, only the rest part is taken, otherwise the full value is used.
\membersection{wxTimeSpan::GetDays}\label{wxtimespangetdays} \membersection{wxTimeSpan::GetDays}\label{wxtimespangetdays}
\constfunc{int}{GetDays}{\void} \constfunc{int}{GetDays}{\void}
Returns the difference in number of days. Returns the difference in number of days.
\membersection{wxTimeSpan::GetHours}\label{wxtimespangethours} \membersection{wxTimeSpan::GetHours}\label{wxtimespangethours}
\constfunc{int}{GetHours}{\void} \constfunc{int}{GetHours}{\void}
Returns the difference in number of hours. Returns the difference in number of hours.
\membersection{wxTimeSpan::GetMilliseconds}\label{wxtimespangetmilliseconds} \membersection{wxTimeSpan::GetMilliseconds}\label{wxtimespangetmilliseconds}
\constfunc{wxLongLong}{GetMilliseconds}{\void} \constfunc{wxLongLong}{GetMilliseconds}{\void}
Returns the difference in number of milliseconds. Returns the difference in number of milliseconds.
\membersection{wxTimeSpan::GetMinutes}\label{wxtimespangetminutes} \membersection{wxTimeSpan::GetMinutes}\label{wxtimespangetminutes}
\constfunc{int}{GetMinutes}{\void} \constfunc{int}{GetMinutes}{\void}
Returns the difference in number of minutes. Returns the difference in number of minutes.
\membersection{wxTimeSpan::GetSeconds}\label{wxtimespangetseconds} \membersection{wxTimeSpan::GetSeconds}\label{wxtimespangetseconds}
\constfunc{wxLongLong}{GetSeconds}{\void} \constfunc{wxLongLong}{GetSeconds}{\void}
Returns the difference in number of seconds. Returns the difference in number of seconds.
\membersection{wxTimeSpan::GetValue}\label{wxtimespangetvalue} \membersection{wxTimeSpan::GetValue}\label{wxtimespangetvalue}
\constfunc{wxLongLong}{GetValue}{\void} \constfunc{wxLongLong}{GetValue}{\void}
Returns the internal representation of timespan. Returns the internal representation of timespan.
\membersection{wxTimeSpan::GetWeeks}\label{wxtimespangetweeks} \membersection{wxTimeSpan::GetWeeks}\label{wxtimespangetweeks}
\constfunc{int}{GetWeeks}{\void} \constfunc{int}{GetWeeks}{\void}
Returns the difference in number of weeks. Returns the difference in number of weeks.
\membersection{wxTimeSpan::Hours}\label{wxtimespanhours} \membersection{wxTimeSpan::Hours}\label{wxtimespanhours}
\func{static wxTimespan}{Hours}{\param{long }{hours}} \func{static wxTimespan}{Hours}{\param{long }{hours}}
Returns the timespan for the given number of hours. Returns the timespan for the given number of hours.
\membersection{wxTimeSpan::Hour}\label{wxtimespanhour} \membersection{wxTimeSpan::Hour}\label{wxtimespanhour}
\func{static wxTimespan}{Hour}{\void} \func{static wxTimespan}{Hour}{\void}
Returns the timespan for one hour. Returns the timespan for one hour.
\membersection{wxTimeSpan::IsEqualTo}\label{wxtimespanisequalto} \membersection{wxTimeSpan::IsEqualTo}\label{wxtimespanisequalto}
\constfunc{bool}{IsEqualTo}{\param{const wxTimeSpan\& }{ts}} \constfunc{bool}{IsEqualTo}{\param{const wxTimeSpan\& }{ts}}
Returns {\tt true} if two timespans are equal. Returns {\tt true} if two timespans are equal.
\membersection{wxTimeSpan::IsLongerThan}\label{wxtimespanislongerthan} \membersection{wxTimeSpan::IsLongerThan}\label{wxtimespanislongerthan}
\constfunc{bool}{IsLongerThan}{\param{const wxTimeSpan\& }{ts}} \constfunc{bool}{IsLongerThan}{\param{const wxTimeSpan\& }{ts}}
@@ -212,24 +236,28 @@ Compares two timespans: works with the absolute values, i.e. -2
hours is longer than 1 hour. Also, it will return {\tt false} if hours is longer than 1 hour. Also, it will return {\tt false} if
the timespans are equal in absolute value. the timespans are equal in absolute value.
\membersection{wxTimeSpan::IsNegative}\label{wxtimespanisnegative} \membersection{wxTimeSpan::IsNegative}\label{wxtimespanisnegative}
\constfunc{bool}{IsNegative}{\void} \constfunc{bool}{IsNegative}{\void}
Returns {\tt true} if the timespan is negative. Returns {\tt true} if the timespan is negative.
\membersection{wxTimeSpan::IsNull}\label{wxtimespanisnull} \membersection{wxTimeSpan::IsNull}\label{wxtimespanisnull}
\constfunc{bool}{IsNull}{\void} \constfunc{bool}{IsNull}{\void}
Returns {\tt true} if the timespan is empty. Returns {\tt true} if the timespan is empty.
\membersection{wxTimeSpan::IsPositive}\label{wxtimespanispositive} \membersection{wxTimeSpan::IsPositive}\label{wxtimespanispositive}
\constfunc{bool}{IsPositive}{\void} \constfunc{bool}{IsPositive}{\void}
Returns {\tt true} if the timespan is positive. Returns {\tt true} if the timespan is positive.
\membersection{wxTimeSpan::IsShorterThan}\label{wxtimespanisshorterthan} \membersection{wxTimeSpan::IsShorterThan}\label{wxtimespanisshorterthan}
\constfunc{bool}{IsShorterThan}{\param{const wxTimeSpan\& }{ts}} \constfunc{bool}{IsShorterThan}{\param{const wxTimeSpan\& }{ts}}
@@ -238,18 +266,21 @@ Compares two timespans: works with the absolute values, i.e. 1
hour is shorter than -2 hours. Also, it will return {\tt false} if hour is shorter than -2 hours. Also, it will return {\tt false} if
the timespans are equal in absolute value. the timespans are equal in absolute value.
\membersection{wxTimeSpan::Minutes}\label{wxtimespanminutes} \membersection{wxTimeSpan::Minutes}\label{wxtimespanminutes}
\func{static wxTimespan}{Minutes}{\param{long }{min}} \func{static wxTimespan}{Minutes}{\param{long }{min}}
Returns the timespan for the given number of minutes. Returns the timespan for the given number of minutes.
\membersection{wxTimeSpan::Minute}\label{wxtimespanminute} \membersection{wxTimeSpan::Minute}\label{wxtimespanminute}
\func{static wxTimespan}{Minute}{\void} \func{static wxTimespan}{Minute}{\void}
Returns the timespan for one minute. Returns the timespan for one minute.
\membersection{wxTimeSpan::Multiply}\label{wxtimespanmultiply} \membersection{wxTimeSpan::Multiply}\label{wxtimespanmultiply}
\constfunc{wxTimeSpan}{Multiply}{\param{int }{n}} \constfunc{wxTimeSpan}{Multiply}{\param{int }{n}}
@@ -260,12 +291,14 @@ Returns the timespan for one minute.
Multiplies timespan by a scalar. Multiplies timespan by a scalar.
\membersection{wxTimeSpan::Negate}\label{wxtimespannegate} \membersection{wxTimeSpan::Negate}\label{wxtimespannegate}
\constfunc{wxTimeSpan}{Negate}{\void} \constfunc{wxTimeSpan}{Negate}{\void}
Returns timespan with inverted sign. Returns timespan with inverted sign.
\membersection{wxTimeSpan::Neg}\label{wxtimespanneg} \membersection{wxTimeSpan::Neg}\label{wxtimespanneg}
\func{wxTimeSpan\&}{Neg}{\void} \func{wxTimeSpan\&}{Neg}{\void}
@@ -274,18 +307,35 @@ Returns timespan with inverted sign.
Negate the value of the timespan. Negate the value of the timespan.
\membersection{wxTimeSpan::Milliseconds}\label{wxtimespanmilliseconds}
\func{static wxTimespan}{Milliseconds}{\param{long }{ms}}
Returns the timespan for the given number of milliseconds.
\membersection{wxTimeSpan::Millisecond}\label{wxtimespanmillisecond}
\func{static wxTimespan}{Millisecond}{\void}
Returns the timespan for one millisecond.
\membersection{wxTimeSpan::Seconds}\label{wxtimespanseconds} \membersection{wxTimeSpan::Seconds}\label{wxtimespanseconds}
\func{static wxTimespan}{Seconds}{\param{long }{sec}} \func{static wxTimespan}{Seconds}{\param{long }{sec}}
Returns the timespan for the given number of seconds. Returns the timespan for the given number of seconds.
\membersection{wxTimeSpan::Second}\label{wxtimespansecond} \membersection{wxTimeSpan::Second}\label{wxtimespansecond}
\func{static wxTimespan}{Second}{\void} \func{static wxTimespan}{Second}{\void}
Returns the timespan for one second. Returns the timespan for one second.
\membersection{wxTimeSpan::Subtract}\label{wxtimespansubtract} \membersection{wxTimeSpan::Subtract}\label{wxtimespansubtract}
\constfunc{wxTimeSpan}{Subtract}{\param{const wxTimeSpan\&}{diff}} \constfunc{wxTimeSpan}{Subtract}{\param{const wxTimeSpan\&}{diff}}
@@ -296,18 +346,21 @@ Returns the timespan for one second.
Returns the difference of two timespans. Returns the difference of two timespans.
\membersection{wxTimeSpan::Weeks}\label{wxtimespanweeks} \membersection{wxTimeSpan::Weeks}\label{wxtimespanweeks}
\func{static wxTimespan}{Weeks}{\param{long }{weeks}} \func{static wxTimespan}{Weeks}{\param{long }{weeks}}
Returns the timespan for the given number of weeks. Returns the timespan for the given number of weeks.
\membersection{wxTimeSpan::Week}\label{wxtimespanweek} \membersection{wxTimeSpan::Week}\label{wxtimespanweek}
\func{static wxTimespan}{Week}{\void} \func{static wxTimespan}{Week}{\void}
Returns the timespan for one week. Returns the timespan for one week.
\membersection{wxTimeSpan::wxTimeSpan}\label{wxtimespanctor} \membersection{wxTimeSpan::wxTimeSpan}\label{wxtimespanctor}
\func{}{wxTimeSpan}{\void} \func{}{wxTimeSpan}{\void}

View File

@@ -1114,6 +1114,10 @@ public:
// constructors // constructors
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// return the timespan for the given number of milliseconds
static wxTimeSpan Milliseconds(wxLongLong ms) { return wxTimeSpan(0, 0, 0, ms); }
static wxTimeSpan Millisecond() { return Milliseconds(1); }
// return the timespan for the given number of seconds // return the timespan for the given number of seconds
static wxTimeSpan Seconds(wxLongLong sec) { return wxTimeSpan(0, 0, sec); } static wxTimeSpan Seconds(wxLongLong sec) { return wxTimeSpan(0, 0, sec); }
static wxTimeSpan Second() { return Seconds(1); } static wxTimeSpan Second() { return Seconds(1); }