Kaynağa Gözat

Linux Kernel.Time: clock -> clock_gettime

Alexander Shiryaev 11 yıl önce
ebeveyn
işleme
07ad48856e

+ 4 - 0
new/_FreeBSDLinuxOpenBSD_Interp/build

@@ -4,6 +4,10 @@
 ConsCompiler.Compile('Lin/Mod', 'Dl.txt')
 ConsCompiler.Compile('Lin/Mod', 'Libc.txt')
 ConsCompiler.Compile('Lin/Mod', 'Iconv.txt')
+
+# Linux only
+ConsCompiler.Compile('Lin/Mod', 'Rt.txt')
+
 DevCompiler.CompileThis Kernel
 
 DevCompiler.CompileThis Files Console Math Strings Meta Dialog

+ 26 - 0
new/_Linux_/Lin/Mod/Rt.txt

@@ -0,0 +1,26 @@
+MODULE LinRt ["librt.so.1"];
+
+	(*
+		A. V. Shiryaev, 2013.12
+
+		GNU/Linux
+		32-bit
+	*)
+
+	CONST
+		CLOCK_REALTIME* = 0;
+		CLOCK_MONOTONIC* = 1;
+	
+	TYPE
+		time_t* = INTEGER;
+
+		timespec_t* = RECORD [untagged]
+			tv_sec*: time_t; (* seconds *)
+			tv_nsec*: INTEGER (* nanoseconds *)
+		END;
+
+		clockid_t* = INTEGER;
+
+	PROCEDURE [ccall] clock_gettime* (clock_id: clockid_t; VAR tp: timespec_t): INTEGER;
+
+END LinRt.

BIN
new/_Linux_/System/Mod/Kernel.odc


BIN
new/_Linux_/libBB.so


BIN
new/_Linux_/libBB0.so