Browse Source

+ readded getepochtime which simply calls gettimeofday

peter 25 years ago
parent
commit
72077676d3
1 changed files with 15 additions and 1 deletions
  1. 15 1
      rtl/linux/linux.pp

+ 15 - 1
rtl/linux/linux.pp

@@ -491,6 +491,7 @@ function  GetTimezoneFile:string;
 
 Procedure GetTimeOfDay(var tv:timeval);
 Function  GetTimeOfDay:longint;
+Function  GetEpochTime: longint;
 Procedure EpochToLocal(epoch:longint;var year,month,day,hour,minute,second:Word);
 Function  LocalToEpoch(year,month,day,hour,minute,second:Word):Longint;
 procedure GetTime(var hour,min,sec,msec,usec:word);
@@ -1316,6 +1317,16 @@ begin
 end;
 
 
+Function GetEpochTime: longint;
+{
+  Get the number of seconds since 00:00, January 1 1970, GMT
+  the time NOT corrected any way
+}
+begin
+  GetEpochTime:=GetTimeOfDay;
+end;
+
+
 Procedure EpochToLocal(epoch:longint;var year,month,day,hour,minute,second:Word);
 {
   Transforms Epoch time into local time (hour, minute,seconds)
@@ -3831,7 +3842,10 @@ End.
 
 {
   $Log$
-  Revision 1.62  2000-02-09 23:09:13  peter
+  Revision 1.63  2000-02-23 17:19:06  peter
+    + readded getepochtime which simply calls gettimeofday
+
+  Revision 1.62  2000/02/09 23:09:13  peter
     * rewrote glob to be much simpler and cleaner, the old code did
       strange complex things with pointers which was unnecessary