ソースを参照

- Removed UnixToWinAge, since revision 444 it does not change its argument, but wastes a lot of CPU cycles converting it from local time and back.

git-svn-id: trunk@23145 -
sergei 12 年 前
コミット
1415569ecb
1 ファイル変更2 行追加16 行削除
  1. 2 16
      rtl/unix/sysutils.pp

+ 2 - 16
rtl/unix/sysutils.pp

@@ -525,17 +525,6 @@ begin
     end;
 end;
 
-{$ifndef FPUNONE}
-Function UnixToWinAge(UnixAge : time_t): Longint;
-
-Var
-  Y,M,D,hh,mm,ss : word;
-
-begin
-  EpochToLocal(UnixAge,y,m,d,hh,mm,ss);
-  Result:=DateTimeToFileDate(EncodeDate(y,m,d)+EncodeTime(hh,mm,ss,0));
-end;
-
 
 Function FileAge (Const FileName : String): Longint;
 
@@ -545,9 +534,8 @@ begin
   If  (fpstat (pointer(FileName),Info)<0) or fpS_ISDIR(info.st_mode) then
     exit(-1)
   else 
-    Result:=UnixToWinAge(info.st_mtime);
+    Result:=info.st_mtime;
 end;
-{$endif}
 
 
 Function FileExists (Const FileName : String) : Boolean;
@@ -725,9 +713,7 @@ begin
      f.Attr:=WinAttr;
      f.Size:=st.st_Size;
      f.Mode:=st.st_mode;
-{$ifndef FPUNONE}
-     f.Time:=UnixToWinAge(st.st_mtime);
-{$endif}
+     f.Time:=st.st_mtime;
      FindGetFileInfo:=true;
    End
   else