mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
one more go-round
This commit is contained in:
parent
e554fc7f93
commit
0adab54678
2 changed files with 9 additions and 9 deletions
|
|
@ -114,20 +114,20 @@ U32 endHighResolutionTimer(U32 time[2])
|
||||||
void startHighResolutionTimer(U32 time[2])
|
void startHighResolutionTimer(U32 time[2])
|
||||||
{
|
{
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"rdtsc\n"
|
"rdtsc\n"
|
||||||
: "=a" (time[0]), "=d" (time[1])
|
: "=a" (time[0]), "=d" (time[1])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
U32 endHighResolutionTimer(U32 time[2])
|
U32 endHighResolutionTimer(U32 time[2])
|
||||||
{
|
{
|
||||||
U32 ticks;
|
U32 ticks;
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
"rdtsc\n"
|
"rdtsc\n"
|
||||||
"sub 0x4(%%ecx), %%edx\n"
|
"sub 0x4(%%ecx), %%edx\n"
|
||||||
"sbb (%%ecx), %%eax\n"
|
"sbb (%%ecx), %%eax\n"
|
||||||
: "=a" (ticks) : "c" (time)
|
: "=a" (ticks) : "c" (time)
|
||||||
);
|
);
|
||||||
return ticks;
|
return ticks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -994,7 +994,7 @@ bool Platform::fileTimeToString(FileTime * time, char * string, U32 strLen) { re
|
||||||
#if defined(TORQUE_DEBUG)
|
#if defined(TORQUE_DEBUG)
|
||||||
ConsoleFunction(testHasSubdir,void,2,2,"tests platform::hasSubDirectory") {
|
ConsoleFunction(testHasSubdir,void,2,2,"tests platform::hasSubDirectory") {
|
||||||
Con::printf("testing %s",(const char*)argv[1]);
|
Con::printf("testing %s",(const char*)argv[1]);
|
||||||
Platform::addExcludedDirectory(".svn");
|
Platform::addExcludedDirectory(".svn");
|
||||||
if(Platform::hasSubDirectory(argv[1]))
|
if(Platform::hasSubDirectory(argv[1]))
|
||||||
Con::printf(" has subdir");
|
Con::printf(" has subdir");
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue