Closed Bug 777032 Opened 8 years ago Closed 8 years ago

use timeBeginPeriod when needed to do high resolution profiling

Categories

(Core :: Gecko Profiler, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: jrmuizel, Unassigned)

Details

(Whiteboard: [snappy])

Attachments

(1 file)

The default sleep time on windows is 15.6ms. This is insufficient for our profiling needs.
Whiteboard: [snappy]
Attachment #645752 - Flags: review?(ehsan)
Comment on attachment 645752 [details] [diff] [review]
Use timeBeginPeriod when necessary

(I hate the :: prefix... It would be good if you can take it out!)
Attachment #645752 - Flags: review?(ehsan) → review+
I hated it at first but it's the style we use in cocoa to say we're calling into OS library.
(In reply to comment #3)
> I hated it at first but it's the style we use in cocoa to say we're calling
> into OS library.

And why did you stop hating it?  I find it distracting, it's like using |this->| to access members...
It's easy to know if you're calling something in Gecko or the OS that isn't cross platform. It's similar to using sStaticVar, give you a bit of info.
(In reply to comment #5)
> It's easy to know if you're calling something in Gecko or the OS that isn't
> cross platform. It's similar to using sStaticVar, give you a bit of info.

OK, I'm fine with it either way, but note that a :: prefix only shows that you're calling something from the global scope.  It could be Gecko, libc, OS function, etc.
https://hg.mozilla.org/mozilla-central/rev/8ed3f453a114
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.