aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/ULight.pas
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-06-09 10:22:14 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-06-09 10:22:14 +0000
commit3158ee2b850ce0311d8cb8f03cbe6b1681a1f48f (patch)
tree2ad9f8a8ed8b7ac82525f94af6db09b1d3e35032 /Game/Code/Classes/ULight.pas
parent46bb010ca7c5eb04551c030105f9999ca80e472f (diff)
downloadusdx-3158ee2b850ce0311d8cb8f03cbe6b1681a1f48f.tar.gz
usdx-3158ee2b850ce0311d8cb8f03cbe6b1681a1f48f.tar.xz
usdx-3158ee2b850ce0311d8cb8f03cbe6b1681a1f48f.zip
- all references to the libc unit removed. The Libc unit (not the library) was for kylix compatibility and should not be used anymore. In addition it seems the libc unit is not available on 64bit systems.
- added some functions that will be introduced with FPC 2.2.2 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1145 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/ULight.pas29
1 files changed, 6 insertions, 23 deletions
diff --git a/Game/Code/Classes/ULight.pas b/Game/Code/Classes/ULight.pas
index f91d614c..a4bebfd2 100644
--- a/Game/Code/Classes/ULight.pas
+++ b/Game/Code/Classes/ULight.pas
@@ -41,42 +41,25 @@ uses
{$IFDEF UseSerialPort}
zlportio,
{$ENDIF}
- {$IFNDEF win32}
- libc,
- {$ENDIF}
UTime;
{$IFDEF FPC}
function GetTime: TDateTime;
- {$IFDEF win32}
var
SystemTime: TSystemTime;
begin
GetLocalTime(SystemTime);
with SystemTime do
-{$IFDEF DARWIN}
+ begin
+ {$IFDEF UNIX}
Result := EncodeTime(Hour, Minute, Second, MilliSecond);
-{$ELSE}
+ {$ELSE}
Result := EncodeTime(wHour, wMinute, wSecond, wMilliSeconds);
-{$ENDIF}
- end;
- {$ELSE}
- Type
- Time_t = longint;
- TTime_T = Time_t;
- var
- T : TTime_T;
- TV: TTimeVal;
- UT: TUnixTime;
- begin
- gettimeofday(TV, nil);
- T := TV.tv_sec;
- localtime_r(@T, @UT);
- Result := EncodeTime(UT.tm_hour, UT.tm_min, UT.tm_sec, TV.tv_usec div 1000);
+ {$ENDIF}
+ end;
end;
- {$ENDIF}
-
+
{$ENDIF}