Open Bug 323039 Opened 20 years ago Updated 3 years ago

Various other events need timeStamps

Categories

(Core :: DOM: Events, defect, P5)

defect

Tracking

()

REOPENED

People

(Reporter: martijn.martijn, Unassigned)

References

()

Details

See url. I've tested a bit, but those event also have a timeStamp of 0. They should also have a timestamp, right? It seems to work when I add this in the code. event.time = PR_Now(); Is that the right approach? Should I do that for all the instances I see it in lxr?
PR_Now() is probably the wrong thing (since we don't want time in _microseconds_). A lot of existing code uses PR_IntervalNow() (which is milliseconds on Unix, but varies on Windows), but some places do PR_Now(). It might be worth deciding what event.timeStamp actually _is_ and then making it consistent. Also note bug 77992.
Ccing some folks who might be interested in this.
OS: Windows XP → All
Hardware: PC → All
Are you talking about exposing this to webpages, or is this an internal (unscriptable) thing?
(In reply to comment #3) > Are you talking about exposing this to webpages, or is this an internal > (unscriptable) thing? > http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-Event Event::timeStamp. The problem is that when an event is dispatched using (for example) nsEvent, the time stamp is not usually updated, but the default value 0 is used. When a nsDOMEvent is created and dispatched, the timestamp is set to PR_Now().
Assignee: events → nobody
Depends on: 77992
QA Contact: ian → events
A similar search on MXR doesn't find anything: http://mxr.mozilla.org/mozilla-central/search?string=nsevent%20event Can it be updated or should this bug be closed?
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.