-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSys.hx
More file actions
72 lines (54 loc) · 1.44 KB
/
Sys.hx
File metadata and controls
72 lines (54 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package;
class Sys {
public static function print(v:Dynamic):Void {
untyped __brs__('Print {0};', v);
}
public static function println(v:Dynamic):Void {
untyped __brs__('Print {0}', v);
}
public static function time():Float {
return untyped __brs__('CreateObject("roTimespan").TotalMilliseconds() / 1000.0');
}
public static function cpuTime():Float {
return time();
}
public static function systemName():String {
return "BrightScript";
}
public static function args():Array<String> {
return [];
}
public static function getEnv(s:String):Dynamic {
return null;
}
public static function putEnv(s:String, v:Dynamic):Void {}
public static function environment():Map<String, String> {
return new Map<String, String>();
}
public static function sleep(seconds:Float):Void {
untyped __brs__('Sleep(Int({0} * 1000))', seconds);
}
public static function getCwd():String {
return "";
}
public static function setCwd(s:String):Void {}
public static function exit(code:Int):Void {
untyped __brs__('End');
}
public static function command(cmd:String, ?args:Array<String>):Int {
return -1;
}
public static function programPath():String {
return "";
}
@:deprecated("Use programPath instead")
public static function executablePath():String {
return programPath();
}
public static function setTimeLocale(loc:String):Bool {
return false;
}
public static function getChar(echo:Bool):Int {
return -1;
}
}