What should I use to replace gettimeofday() on Windows?

后端 未结 4 1420
半阙折子戏
半阙折子戏 2020-12-13 05:14

I\'m writing a portable Socket class that supports timeouts for both sending and receiving... To implement these timeouts I\'m using select().... But, I sometim

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-13 05:19

    You can check out QueryPerformanceCounter and QueryPerformanceFrequency. These are very high resolution- down to one tick per ten cycles on some hardware- timers.

提交回复
热议问题