Changeset 268 for Include/Classes/System/TimeSpan.ab
- Timestamp:
- Jun 2, 2007, 7:04:19 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/TimeSpan.ab
r265 r268 20 20 End Sub 21 21 22 Sub TimeSpan( ByRefts As TimeSpan)22 Sub TimeSpan(ts As TimeSpan) 23 23 m_Time = ts.m_Time 24 24 End Sub … … 27 27 End Sub 28 28 29 Function Operator+ ( ByRefts As TimeSpan) As TimeSpan29 Function Operator+ (ts As TimeSpan) As TimeSpan 30 30 Return FromTicks(m_Time + ts.m_Time) 31 31 End Function 32 32 33 Function Operator- ( ByRefts As TimeSpan) As TimeSpan33 Function Operator- (ts As TimeSpan) As TimeSpan 34 34 Return FromTicks(m_Time - ts.m_Time) 35 35 End Function … … 43 43 End Function 44 44 45 Function Operator== ( ByRefts As TimeSpan) As Boolean45 Function Operator== (ts As TimeSpan) As Boolean 46 46 Return Equals(ts) 47 47 End Function 48 48 49 Function Operator<> ( ByRefts As TimeSpan) As Boolean49 Function Operator<> (ts As TimeSpan) As Boolean 50 50 Return Not Equals(ts) 51 51 End Function 52 52 53 Function Operator> ( ByRefts As TimeSpan) As Boolean53 Function Operator> (ts As TimeSpan) As Boolean 54 54 If CompareTo(ts) > 0 Then 55 55 Return True … … 59 59 End Function 60 60 61 Function Operator< ( ByRefts As TimeSpan) As Boolean61 Function Operator< (ts As TimeSpan) As Boolean 62 62 If CompareTo(ts) < 0 Then 63 63 Return True … … 67 67 End Function 68 68 69 Function Operator>= ( ByRefts As TimeSpan) As Boolean69 Function Operator>= (ts As TimeSpan) As Boolean 70 70 If CompareTo(ts) => 0 Then 71 71 Return True … … 75 75 End Function 76 76 77 Function Operator<= ( ByRefts As TimeSpan) As Boolean77 Function Operator<= (ts As TimeSpan) As Boolean 78 78 If CompareTo(ts) <= 0 Then 79 79 Return True … … 128 128 End Function 129 129 130 Function Add( ByRefts As TimeSpan) As TimeSpan130 Function Add(ts As TimeSpan) As TimeSpan 131 131 Return FromTicks(m_Time + ts.m_Time) 132 132 End Function 133 133 134 Static Function Compare( ByRef ts1 As TimeSpan, ByRefts2 As TimeSpan) As Long134 Static Function Compare(ts1 As TimeSpan, ts2 As TimeSpan) As Long 135 135 If ts1.m_Time < ts2.m_Time Then 136 136 Return -1 … … 142 142 End Function 143 143 144 Function CompareTo( ByRefts As TimeSpan) As Long144 Function CompareTo(ts As TimeSpan) As Long 145 145 Return (m_Time - ts.m_Time) As Long 146 146 End Function 147 147 148 148 Function Duration() As TimeSpan 149 Return FromTicks( Math.Abs(m_Time))150 End Function 151 152 Function Equals( ByRefts As TimeSpan) As Boolean149 Return FromTicks(System.Math.Abs(m_Time)) 150 End Function 151 152 Function Equals(ts As TimeSpan) As Boolean 153 153 Return Equals(This, ts) 154 154 End Function 155 155 156 Static Function Equals( ByRef ts1 As TimeSpan, ByRefts2 As TimeSpan) As Boolean156 Static Function Equals(ts1 As TimeSpan, ts2 As TimeSpan) As Boolean 157 157 If ts1.m_Time = ts2.m_Time Then 158 158 Return True … … 195 195 End Function 196 196 197 Function Subtract( ByRefts As TimeSpan) As TimeSpan197 Function Subtract(ts As TimeSpan) As TimeSpan 198 198 Return FromTicks(m_Time - ts.m_Time) 199 199 End Function
Note:
See TracChangeset
for help on using the changeset viewer.