53b43b0f79
Ship the QUALITY_PLAN stretch from ownership through ecosystem: C.1 lifetime elision (bootstrap + selfhost), bux fmt/test/doc CI hooks, stdlib goldens, package registry (bux search/add), and LSP 0.4 position-sensitive locals with inferred let types. Full-tree format pass plus Map/Set remove double-free fix.
25 lines
824 B
Plaintext
25 lines
824 B
Plaintext
// Os & Time - System and time utilities
|
|
import Std::Io::{PrintLine};
|
|
import Std::Os::{Os_ArgsCount, Os_Args, Os_GetEnv, Os_GetCwd};
|
|
import Std::Time::{Time_NowMs, Time_SleepMs};
|
|
import Std::Fmt::{Fmt_Fmt1, Fmt_FmtInt};
|
|
|
|
func Main() -> int {
|
|
PrintLine("=== OS Demo ===");
|
|
PrintLine(Fmt_Fmt1("Current directory: {0}", Os_GetCwd()));
|
|
PrintLine(Fmt_FmtInt("Command-line args: {0}", Os_ArgsCount() as int64));
|
|
PrintLine(Fmt_Fmt1("HOME env: {0}", Os_GetEnv("HOME")));
|
|
|
|
PrintLine("\n=== Time Demo ===");
|
|
let start: int64 = Time_NowMs();
|
|
PrintLine(Fmt_FmtInt("Start: {0} ms", start));
|
|
PrintLine("Sleeping 150ms...");
|
|
Time_SleepMs(150);
|
|
|
|
let end: int64 = Time_NowMs();
|
|
PrintLine(Fmt_FmtInt("End: {0} ms", end));
|
|
PrintLine(Fmt_FmtInt("Elapsed: {0} ms", end - start));
|
|
|
|
return 0;
|
|
}
|