Pārlūkot izejas kodu

added new hl profile api

Nicolas Cannasse 5 gadi atpakaļ
vecāks
revīzija
ebc56ea675
1 mainītis faili ar 10 papildinājumiem un 0 dzēšanām
  1. 10 0
      std/hl/Profile.hx

+ 10 - 0
std/hl/Profile.hx

@@ -218,4 +218,14 @@ class Profile {
 	public static function getFieldName(hash:Int):Bytes {
 		return null;
 	}
+	
+	@:hlNative(1.11)
+	static function sys_profile_event( code : Int, data : hl.Bytes, dataLen : Int ) : Void {}
+	public static function event( code : Int, ?data : String ) @:privateAccess {
+		sys_profile_event(code,data == null ? null : data.bytes, data == null ? 0 : (data.length<<1));
+	}
+	public static function eventBytes( code : Int, data : haxe.io.Bytes ) @:privateAccess {
+		sys_profile_event(code,data == null ? null : data, data == null ? 0 : data.length);
+	}
+	
 }