index a9e254bd725365b52b5444a1370d62bd14ee14fb..247229b88af696d43b157e587f0cdcf09410604d 100644 (file)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation, version 3 of the License ONLY.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
uses
SysUtils, Classes,
- GL, GLExt,
- {$IF DEFINED(LINUX)}
+ {$INCLUDE ../nogl/noGLuses.inc}
+ {$IF DEFINED(LINUX) OR DEFINED(ANDROID)}
unixtype, linux
{$ELSEIF DEFINED(WINDOWS)}
Windows
+ {$ELSEIF DEFINED(HAIKU) OR DEFINED(UNIX)}
+ unixtype
{$ELSE}
{$WARNING You suck!}
{$ENDIF}
if not mHasHPTimer then raise Exception.Create('profiler error: hires timer is not available');
mFrequency := 1; // just a flag
if (r.tv_nsec <> 0) then mFrequency := 1000000000000000000 div r.tv_nsec;
-{$ELSE}
+{$ELSEIF DEFINED(WINDOWS)}
mHasHPTimer := QueryPerformanceFrequency(r);
if not mHasHPTimer then raise Exception.Create('profiler error: hires timer is not available');
mFrequency := r;
{$IF DEFINED(LINUX)}
clock_gettime(CLOCK_MONOTONIC, @r);
result := UInt64(r.tv_sec)*1000000+UInt64(r.tv_nsec) div 1000; // microseconds
- {$ELSE}
+ {$ELSEIF DEFINED(WINDOWS)}
QueryPerformanceCounter(r);
result := UInt64(r)*1000000 div mFrequency;
{$ENDIF}