equal
deleted
inserted
replaced
73 TUint32 currentTime = NKern::TickCount(); |
73 TUint32 currentTime = NKern::TickCount(); |
74 c.iTotal += (TInt64)c.iCount * (currentTime - c.iLastUpdateTime); |
74 c.iTotal += (TInt64)c.iCount * (currentTime - c.iLastUpdateTime); |
75 c.iCount += aDelta; |
75 c.iCount += aDelta; |
76 c.iLastUpdateTime = currentTime; |
76 c.iLastUpdateTime = currentTime; |
77 |
77 |
|
78 if(!iUpdateTimer.IsPending()) |
|
79 { |
|
80 TInt r = iUpdateTimer.OneShot(KUpdatePeriod, iUpdateDfc); |
|
81 __NK_ASSERT_ALWAYS(r == KErrNone); |
|
82 } |
|
83 |
78 NKern::FMSignal(&iMutex); |
84 NKern::FMSignal(&iMutex); |
79 |
85 |
80 __NK_ASSERT_DEBUG(c.iCount >= 0); |
86 __NK_ASSERT_DEBUG(c.iCount >= 0); |
81 } |
87 } |
82 |
88 |
143 Kern::AsyncNotifyChanges(EChangesThrashLevel); |
149 Kern::AsyncNotifyChanges(EChangesThrashLevel); |
144 NKern::ThreadLeaveCS(); |
150 NKern::ThreadLeaveCS(); |
145 } |
151 } |
146 |
152 |
147 iLastUpdateTime = currentTime; |
153 iLastUpdateTime = currentTime; |
148 TInt r = iUpdateTimer.Again(KUpdatePeriod); |
154 |
149 if (r == KErrArgument) |
155 if(iThrashLevel != 0) |
150 r = iUpdateTimer.OneShot(KUpdatePeriod, iUpdateDfc); |
156 { |
151 __NK_ASSERT_ALWAYS(r == KErrNone); |
157 NKern::FMWait(&iMutex); |
|
158 if(!iUpdateTimer.IsPending()) |
|
159 { |
|
160 TInt r = iUpdateTimer.Again(KUpdatePeriod); |
|
161 if (r == KErrArgument) |
|
162 { |
|
163 r = iUpdateTimer.OneShot(KUpdatePeriod, iUpdateDfc); |
|
164 } |
|
165 __NK_ASSERT_ALWAYS(r == KErrNone); |
|
166 } |
|
167 NKern::FMSignal(&iMutex); |
|
168 |
|
169 } |
|
170 |
152 } |
171 } |