[webkit-changes] cvs commit: WebCore/kwq KWQDateTime.mm
Darin
darin at opensource.apple.com
Tue Nov 29 09:17:32 PST 2005
darin 05/11/29 09:17:31
Modified: . ChangeLog
kwq KWQDateTime.mm
Log:
Reviewed by Geoff.
- fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5679
speed up QTime by removing unnecessary CFAbsoluteTimeGetGregorianDate
* kwq/KWQDateTime.mm:
(QTime::msec): Just multiply and mod the time in seconds, don't bother converting to
a Gregorian date first, since that won't affect fractional seconds.
(QTime::addMSecs): Multiply by 1/1000 instead of dividing by 1000.
Revision Changes Path
1.424 +12 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.423
retrieving revision 1.424
diff -u -r1.423 -r1.424
--- ChangeLog 29 Nov 2005 17:14:28 -0000 1.423
+++ ChangeLog 29 Nov 2005 17:17:27 -0000 1.424
@@ -2,6 +2,18 @@
Reviewed by Geoff.
+ - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=5679
+ speed up QTime by removing unnecessary CFAbsoluteTimeGetGregorianDate
+
+ * kwq/KWQDateTime.mm:
+ (QTime::msec): Just multiply and mod the time in seconds, don't bother converting to
+ a Gregorian date first, since that won't affect fractional seconds.
+ (QTime::addMSecs): Multiply by 1/1000 instead of dividing by 1000.
+
+2005-11-29 Darin Adler <darin at apple.com>
+
+ Reviewed by Geoff.
+
- fixed <rdar://problem/4300202> JavaScript event keyCode/charCode/which is 25 for shift+tab, should be 9 (5678)
also http://bugzilla.opendarwin.org/show_bug.cgi?id=5678
1.15 +2 -3 WebCore/kwq/KWQDateTime.mm
Index: KWQDateTime.mm
===================================================================
RCS file: /cvs/root/WebCore/kwq/KWQDateTime.mm,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- KWQDateTime.mm 3 Oct 2005 21:13:02 -0000 1.14
+++ KWQDateTime.mm 29 Nov 2005 17:17:31 -0000 1.15
@@ -49,14 +49,13 @@
int QTime::msec() const
{
- CFAbsoluteTime seconds = CFAbsoluteTimeGetGregorianDate(timeInSeconds, systemTimeZone()).second;
- return (int)(seconds * 1000) % 1000;
+ return (int)(timeInSeconds * 1000) % 1000;
}
QTime QTime::addMSecs(int msecs) const
{
QTime newTime(*this);
- newTime.timeInSeconds += ((double)msecs)/1000.0;
+ newTime.timeInSeconds += msecs * 0.001;
return newTime;
}
More information about the webkit-changes
mailing list