On Jun 3, 2008, at 5:28 PM, Davide Scheriani wrote:

hi,
I wanted to do a small frame rate check to see on my nsview as debug output.
How can I do this?

tnx

I made an NSDate ivar in the view.
At the start of drawRect I stored the current time in it.
At the end of drawRect I subtracted that ivar from the current time at that point in the code. I took the reciprocal of that result (seconds per frame) to get fps and drew the string into my view.
I found it very useful to see how fast my view was drawing.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to