Getting a tick count in Mac OS X

I am porting a simple C++ game from Windows to Mac OS X for teaching purposes. I need to know how to get a tick count from Mac OS X (Unix) for the main loop.
I know how to do this in Cocoa and Carbon, but I want to keep it as simple as possible for the students, since the focus is on C++ not the API's.
Any suggestions.