As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 323039 - Various other events need timeStamps
: Various other events need timeStamps
Status: NEW
Product: Core
Classification: Components
Component: DOM: Events (show other bugs)
: Trunk
: All All
: -- normal with 3 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: Andrew Overholt [:overholt]
Depends on: 77992
  Show dependency treegraph
Reported: 2006-01-11 06:24 PST by Martijn Wargers [:mwargers]
Modified: 2014-10-03 16:44 PDT (History)
10 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image Martijn Wargers [:mwargers] 2006-01-11 06:24:28 PST
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?
Comment 1 User image Boris Zbarsky [:bz] (still a bit busy) 2006-01-11 09:18:07 PST
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.
Comment 2 User image Boris Zbarsky [:bz] (still a bit busy) 2006-01-11 09:19:37 PST
Ccing some folks who might be interested in this.
Comment 3 User image Jonas Sicking (:sicking) No longer reading bugmail consistently 2006-01-11 11:49:54 PST
Are you talking about exposing this to webpages, or is this an internal (unscriptable) thing?
Comment 4 User image Olli Pettay [:smaug] (review request backlog because of a work week) 2006-01-11 12:06:42 PST
(In reply to comment #3)
> Are you talking about exposing this to webpages, or is this an internal
> (unscriptable) thing?

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().
Comment 5 User image Nickolay_Ponomarev 2014-10-03 16:44:14 PDT
A similar search on MXR doesn't find anything:
Can it be updated or should this bug be closed?

Note You need to log in before you can comment on or make changes to this bug.