Original Post
I'm using C++ on Windows and I'm trying to write a class that picks the best "tick count" functionality available and returns the current tick. I'm first checking for QueryPerformanceCounter(), then timeGetTime(), and finally GetTickCount(). Basically I want to use the best resolution timer available, but I'm not sure how to create a consistent class interface (or if its possible). For example: QueryPerformanceCounter() returns the tick in a LARGE_INTEGER. timeGetTime() returns a DWORD. GetTickCount() also returns a DWORD. My class will have a function "get_tick()", which uses the version it decided was the best in the class constructor. I'd like the get_tick() function to return a value of the same time no matter what tick function was called. Now I'm pretty sure this can be done by casting, but I'm having trouble figuring out how to cast from the LARGE_INTEGER type. Any advice would be appreciated. Hopefully I'm on the right lines... thanks jimbogd