mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 20:25:44 +00:00
Bug 1347348 (part 2) - Add a comment about the profiler's "startTime" field. r=mstange.
It took me some time to understand this snippet of code, so I wrote a comment about it. --HG-- extra : rebase_source : b25fc8384a4fe00df7d8a0585e7a1944226fa212
This commit is contained in:
parent
0414a346c4
commit
af3c0f7fd5
@ -1128,6 +1128,9 @@ StreamMetaJSCustomObject(PS::LockRef aLock, SpliceableJSONWriter& aWriter)
|
||||
bool asyncStacks = Preferences::GetBool("javascript.options.asyncstack");
|
||||
aWriter.IntProperty("asyncstack", asyncStacks);
|
||||
|
||||
// The "startTime" field holds the number of milliseconds since midnight
|
||||
// January 1, 1970 GMT. This grotty code computes (Now - (Now - StartTime))
|
||||
// to convert gPS->StartTime() into that form.
|
||||
mozilla::TimeDuration delta =
|
||||
mozilla::TimeStamp::Now() - gPS->StartTime(aLock);
|
||||
aWriter.DoubleProperty(
|
||||
|
Loading…
Reference in New Issue
Block a user