Sha256: 763b616f8a1e037ea55920484558bede67b7dd999392fc5cb850f3696d9d96dd

Contents?: true

Size: 342 Bytes

Versions: 5

Compression:

Stored size: 342 Bytes

Contents

#include <Gosu/Timing.hpp>
#include <Gosu/Math.hpp>
#include <unistd.h>
#include <time.h>
#include <sys/time.h>

void Gosu::sleep(unsigned milliseconds)
{
	usleep(milliseconds * 1000);
}

unsigned long Gosu::milliseconds()
{
	timeval tp;
	gettimeofday(&tp, NULL);
	return Gosu::trunc(tp.tv_usec / 1000 + tp.tv_sec * 1000);
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gosu-0.7.10.1 GosuImpl/TimingUnix.cpp
gosu-0.7.10.2 GosuImpl/TimingUnix.cpp
gosu-0.7.10.3 GosuImpl/TimingUnix.cpp
gosu-0.7.11 GosuImpl/TimingUnix.cpp
gosu-0.7.12 GosuImpl/TimingUnix.cpp