Sha256: ee2f1c51bcd0df9b4193fa7a1152753ef22c367f0a926181ee41b81944292ef5
Contents?: true
Size: 482 Bytes
Versions: 21
Compression:
Stored size: 482 Bytes
Contents
#include <Gosu/Platform.hpp> #if defined(GOSU_IS_X) #include <Gosu/Timing.hpp> #include <sys/time.h> #include <unistd.h> void Gosu::sleep(unsigned milliseconds) { usleep(milliseconds * 1000); } unsigned long Gosu::milliseconds() { static unsigned long start = 0; timeval tp; gettimeofday(&tp, nullptr); if (start == 0) { start = tp.tv_usec / 1000UL + tp.tv_sec * 1000UL; } return tp.tv_usec / 1000UL + tp.tv_sec * 1000UL - start; } #endif
Version data entries
21 entries across 21 versions & 1 rubygems